Skip to content

Commit

Permalink
Add PHP 8.2 to Unit Tests GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan committed Jun 22, 2022
1 parent 099b6f4 commit 7ea67f1
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/test-phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['7.4', '8.0', '8.1']
php-versions: ['7.4', '8.0', '8.1', '8.2']
db-platforms: ['MySQLi', 'Postgre', 'SQLite3', 'SQLSRV', 'OCI8']
mysql-versions: ['5.7']
include:
Expand Down Expand Up @@ -151,10 +151,18 @@ jobs:
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

# remove when PHP 8.2 is generally available
- name: Ignore option for PHP version
uses: actions/github-script@v6
id: composer-ignore-php-option
with:
script: 'return "${{ matrix.php-versions }}" == "8.2" ? "--ignore-platform-req=php" : ""'
result-encoding: string

- name: Install dependencies
run: |
composer update --ansi --no-interaction
composer remove --ansi --dev --unused -W -- rector/rector phpstan/phpstan friendsofphp/php-cs-fixer nexusphp/cs-config codeigniter/coding-standard
composer update --ansi --no-interaction ${{ steps.composer-ignore-php-option.outputs.result }}
composer remove --ansi --dev --unused ${{ steps.composer-ignore-php-option.outputs.result }} -W -- rector/rector phpstan/phpstan friendsofphp/php-cs-fixer nexusphp/cs-config codeigniter/coding-standard
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}

Expand All @@ -170,6 +178,7 @@ jobs:
result-encoding: string

- name: Test with PHPUnit
continue-on-error: ${{ matrix.php-versions == '8.2' }} # remove when PHP 8.2 is generally available
run: script -e -c "vendor/bin/phpunit --color=always --exclude-group=auto-review ${{ steps.phpunit-coverage-option.outputs.result }}"
env:
DB: ${{ matrix.db-platforms }}
Expand Down

0 comments on commit 7ea67f1

Please sign in to comment.