Run github actions with PHP 8.3, run tests with PHP 8.4 #154
Workflow file for this run
This file contains 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: PHPUnit | ||
on: | ||
push: | ||
pull_request: | ||
jobs: | ||
tests: | ||
name: Tests (PHP ${{ matrix.php }}) | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
operating-system: ['ubuntu-latest'] | ||
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
- name: Setup PHP with composer and extensions | ||
if: ${{ matrix.php =< '8.3' }} | ||
Check failure on line 26 in .github/workflows/unit-tests.yml
|
||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: xdebug | ||
tools: none | ||
- name: Setup PHP with composer and extensions (PHP 8.4) | ||
if: ${{ matrix.php >= '8.4' }} | ||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: none | ||
tools: none | ||
- name: "Install Composer dependencies" | ||
if: ${{ matrix.php =< '8.3' }} | ||
uses: "ramsey/composer-install@v2" | ||
- name: "Install Composer dependencies (PHP 8.4)" | ||
if: ${{ matrix.php >= '8.4' }} | ||
uses: "ramsey/composer-install@v2" | ||
with: | ||
composer-options: --ignore-platform-reqs | ||
- name: Run tests | ||
run: composer run phpunit -- --coverage-clover .phpunit.cache/clover.xml | ||
- name: Upload coverage reports to Codecov | ||
if: ${{ success() && matrix.php == '8.3' }} | ||
uses: codecov/codecov-action@v3 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
with: | ||
files: ./.phpunit.cache/clover.xml | ||
fail_ci_if_error: true | ||
verbose: true |