Update phpunit/phpunit requirement from ^9.6.13 to ^9.6.13 || ^11.0.0 #171
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: CI | |
on: | |
pull_request: ~ | |
push: | |
branches: | |
- 1.x | |
schedule: | |
- cron: "42 3 * * 1" | |
jobs: | |
tests: | |
name: ${{ matrix.description }} - PHP ${{ matrix.php }} | |
runs-on: ubuntu-latest | |
services: | |
mongo: | |
image: mongo:4.4 | |
ports: | |
- 27017:27017 | |
env: | |
MONGO_INITDB_ROOT_USERNAME: root | |
MONGO_INITDB_ROOT_PASSWORD: rootPass | |
strategy: | |
matrix: | |
composer: ['composer:v2'] | |
dependencies: ['highest'] | |
description: ['Tests'] | |
php: ['8.3'] | |
mongodb: ['1.17.2'] | |
include: | |
- description: Tests - Symfony 6.4 | |
php: '8.2' | |
symfony-version: '6.4.*' | |
mongodb: '1.15.3' # 1.15 introduced PHP 8.2 support | |
- description: Tests - Symfony 5.4 | |
php: '8.1' | |
symfony-version: '5.4.*' | |
mongodb: '1.12.1' # 1.12 introduced PHP 8.1 support | |
- description: Tests - Symfony 5.4 | |
php: '8.0' | |
symfony-version: '5.4.*' | |
- description: Tests - Symfony 4.4 | |
php: '7.4' | |
mongodb: '1.9.2' # 1.9.0 introduced PHP 8.0 support | |
symfony-version: '4.4.*' | |
- description: Prefer lowest | |
composer: 'composer:v1' | |
dependencies: 'lowest' | |
php: '7.4' | |
symfony-version: '^4.4.1' | |
mongodb: '1.2.0' | |
deprecations: disabled | |
- description: Infection | |
mongodb: '1.9.2' | |
php: '7.4' | |
symfony-version: '4.4.*' | |
env: | |
MONGO_HOST: localhost | |
SYMFONY_REQUIRE: ${{ matrix.symfony-version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: mongodb | |
coverage: xdebug2 | |
tools: flex,${{ matrix.composer }} | |
- name: Allow unstable dependencies | |
run: composer config minimum-stability dev | |
if: matrix.symfony-version == 'dev-master' | |
- name: Install dependencies | |
uses: "ramsey/composer-install@v3" | |
with: | |
dependency-versions: ${{ matrix.dependencies }} | |
- name: Await a bit for Mongo to spin up... | |
run: timeout 60 nc -z localhost 27017 | |
- name: Run tests | |
if: matrix.description != 'Infection' | |
run: vendor/bin/phpunit --coverage-clover=build/coverage-report.xml | |
env: | |
SYMFONY_DEPRECATIONS_HELPER: ${{ matrix.deprecations }} | |
- name: Run mutation testing | |
if: matrix.description == 'Infection' | |
run: vendor/bin/infection --show-mutations | |
- name: Upload code coverage | |
if: matrix.description != 'Infection' | |
uses: codecov/codecov-action@v5 | |
with: | |
files: build/coverage-report.xml | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} |