Merge pull request #17 from php-collective/php84 #53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
testsuite: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: ['8.1', '8.4'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: mbstring, intl, bcmath | |
coverage: pcov | |
- name: Composer install | |
continue-on-error: ${{ matrix.php-version == '8.3' }} | |
run: | | |
composer --version | |
composer install | |
- name: Run PHPUnit | |
continue-on-error: ${{ matrix.php-version == '8.3' }} | |
run: | | |
if [[ ${{ matrix.php-version }} == '8.1' ]]; then | |
vendor/bin/phpunit --coverage-clover=coverage.xml | |
else | |
vendor/bin/phpunit | |
fi | |
- name: Code Coverage Report | |
if: success() && matrix.php-version == '8.1' | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
validation: | |
name: Coding Standard & Static Analysis | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
extensions: mbstring, intl, bcmath | |
coverage: none | |
- name: Composer Install | |
run: composer install | |
- name: Run phpstan | |
run: vendor/bin/phpstan analyse --error-format=github | |
- name: Run phpcs | |
run: composer cs-check |