From 8ad008e86804836160f7bd8e4933f3d7a1ced770 Mon Sep 17 00:00:00 2001 From: Corey Taylor Date: Sun, 3 Jul 2022 23:54:54 -0500 Subject: [PATCH] Add php 8.2 to github actions and update versions --- .github/workflows/ci.yml | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f68974b63..a02f2be85 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,14 @@ name: CI -on: ['push', 'pull_request'] +on: + push: + branches: + - '0.x' + - '0.next' + - '1.x' + pull_request: + branches: + - '*' jobs: testsuite: @@ -8,13 +16,15 @@ jobs: strategy: fail-fast: false matrix: - php-version: ['7.2', '8.0', '8.1'] + php-version: ['7.2', '7.4', '8.0', '8.1'] db-type: [sqlite, mysql, pgsql] prefer-lowest: [''] include: + - php-version: '8.2' + db-type: mysql - php-version: '7.2' - db-type: 'mysql' - prefer-lowest: 'prefer-lowest' + db-type: mysql + prefer-lowest: prefer-lowest steps: - name: Setup MySQL latest @@ -57,7 +67,7 @@ jobs: - name: Composer install run: | - if [[ ${{ matrix.php-version }} == '8.1' ]]; then + if [[ ${{ matrix.php-version }} == '8.2' ]]; then composer install --ignore-platform-req=php elif ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then composer update --prefer-lowest --prefer-stable @@ -89,7 +99,7 @@ jobs: if [[ ${{ matrix.db-type }} == 'mysql' ]]; then export MYSQL_DSN='mysql://root:root@127.0.0.1/phinx'; fi if [[ ${{ matrix.db-type }} == 'pgsql' ]]; then export PGSQL_DSN='pgsql://postgres:postgres@127.0.0.1/phinx'; fi - if [[ ${{ matrix.php-version }} == '8.0' ]]; then + if [[ ${{ matrix.php-version }} == '8.1' ]]; then export CODECOVERAGE=1 && vendor/bin/phpunit --verbose --coverage-clover=coverage.xml else vendor/bin/phpunit @@ -97,19 +107,19 @@ jobs: - name: Prefer lowest check if: matrix.prefer-lowest == 'prefer-lowest' - run: composer require --dev dereuromark/composer-prefer-lowest && vendor/bin/validate-prefer-lowest -m + run: composer require --dev dereuromark/composer-prefer-lowest && vendor/bin/validate-prefer-lowest -m - name: Submit code coverage - if: matrix.php-version == '8.0' + if: matrix.php-version == '8.1' uses: codecov/codecov-action@v3 testsuite-windows: runs-on: windows-2019 - name: Windows - PHP 7.4 & SQL Server + name: Windows - PHP 8.1 & SQL Server env: EXTENSIONS: pdo_sqlsrv - PHP_VERSION: '7.4' + PHP_VERSION: '8.1' steps: - uses: actions/checkout@v3 @@ -181,7 +191,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '7.2' + php-version: '7.4' coverage: none - name: Get composer cache directory @@ -205,4 +215,5 @@ jobs: run: vendor/bin/phpcs --report=checkstyle -np app/ src/ tests/ - name: Run phpstan + if: always() run: vendor/bin/phpstan.phar analyse --error-format=github