Grouping #71
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: | |
test: | |
name: Run PHPUnit on PHP ${{ matrix.php }} with ${{ matrix.dependencies }} dependencies | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ] | |
dependencies: [ 'lowest', 'highest' ] | |
exclude: | |
- php: '8.0' | |
dependencies: 'lowest' | |
- php: '8.1' | |
dependencies: 'lowest' | |
- php: '8.2' | |
dependencies: 'lowest' | |
env: | |
PHP_VERSION: ${{ matrix.php }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Build containers | |
run: docker compose build | |
- name: Install Composer dependencies with the highest version | |
if: matrix.dependencies == 'highest' | |
run: docker compose run composer update --no-interaction --no-progress | |
- name: Install Composer dependencies with the lowest stable version | |
if: matrix.dependencies == 'lowest' | |
run: docker compose run composer update --no-interaction --no-progress --prefer-lowest --prefer-stable | |
- name: Run PHPUnit | |
run: docker compose run phpunit | |
coverage: | |
name: Analyze code coverage | |
runs-on: ubuntu-latest | |
env: | |
PHP_VERSION: 7.2 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Build containers | |
run: docker compose build | |
- name: Install Composer dependencies | |
run: docker compose run composer update --no-interaction --no-progress | |
- name: Run PHPUnit with a coverage analysis | |
run: docker compose run phpunit --coverage-clover coverage.xml | |
- name: Upload the coverage report | |
uses: codecov/codecov-action@v3 |