From bed3207798388ff8d0766475716e85b0ddb9acfa Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov <38059171+askvortsov1@users.noreply.github.com> Date: Wed, 3 Mar 2021 08:48:03 -0500 Subject: [PATCH] Fix CI (#2654) --- .github/workflows/test.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6204c2c8f..288b2d5c3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - php: [7.2, 7.3, 7.4, '8.0'] + php: ['7.2', '7.3', '7.4', '8.0'] service: ['mysql:5.7', mariadb] prefix: ['', flarum_] @@ -51,13 +51,22 @@ jobs: steps: - uses: actions/checkout@master - - name: Select PHP version - run: sudo update-alternatives --set php $(which php${{ matrix.php }}) + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: xdebug + extensions: curl, dom, gd, json, mbstring, openssl, pdo_mysql, tokenizer, zip + tools: phpunit, composer:v2 + # The authentication alter is necessary because newer mysql versions use the `caching_sha2_password` driver, + # which isn't supported prior to PHP7.4 + # When we drop support for PHP7.3, we should remove this from the setup. - name: Create MySQL Database run: | sudo systemctl start mysql mysql -uroot -proot -e 'CREATE DATABASE flarum_test;' --port 13306 + mysql -uroot -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';" --port 13306 - name: Install Composer dependencies run: composer install