Skip to content

Run tests against PHP 8.4 #1440

Run tests against PHP 8.4

Run tests against PHP 8.4 #1440

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- master
- release/**
permissions:
contents: read
jobs:
tests:
name: Tests (${{ matrix.os }}, ${{ matrix.php.version }}, ${{ matrix.dependencies }})
runs-on: ubuntu-latest
env:
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
strategy:
fail-fast: false
matrix:
php:
- { version: '7.2', phpunit: '^8.5.40' }
- { version: '7.3', phpunit: '^9.6.21' }
- { version: '7.4', phpunit: '^9.6.21' }
- { version: '8.0', phpunit: '^9.6.21' }
- { version: '8.1', phpunit: '^9.6.21' }
- { version: '8.2', phpunit: '^9.6.21' }
- { version: '8.3', phpunit: '^9.6.21' }
- { version: '8.4', phpunit: '^9.6.21' }
symfony-version:
- 4.4.*
- 5.*
- 6.*
- 7.*
dependencies:
- lowest
- highest
exclude:
- php.version: '7.2'

Check failure on line 40 in .github/workflows/tests.yaml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/tests.yaml (Line: 40, Col: 13): Matrix exclude key 'php.version' does not match any key within the matrix .github/workflows/tests.yaml (Line: 42, Col: 13): Matrix exclude key 'php.version' does not match any key within the matrix
symfony-version: 6.*
- php.version: '7.3'
symfony-version: 6.*
- php.version: '7.4'
symfony-version: 6.*
- php.version: '7.2'
symfony-version: 7.*
- php.version: '7.3'
symfony-version: 7.*
- php.version: '7.4'
symfony-version: 7.*
- php.version: '8.0'
symfony-version: 7.*
- php.version: '8.1'
symfony-version: 7.*
- php.version: '8.4'
symfony-version: 4.4.*
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php.version }}
coverage: pcov
tools: flex
- name: Setup Problem Matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
# These dependencies are not used running the tests but can cause deprecation warnings so we remove them before running the tests
- name: Remove unused dependencies
run: composer remove vimeo/psalm phpstan/phpstan friendsofphp/php-cs-fixer --dev --no-interaction --no-update
- name: Set phpunit/phpunit version constraint
run: composer require phpunit/phpunit:'${{ matrix.php.phpunit }}' --dev --no-interaction --no-update
- name: Install dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: --prefer-dist
- name: Run tests
run: vendor/bin/phpunit --coverage-clover=build/coverage-report.xml
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
file: build/coverage-report.xml
token: ${{ secrets.CODECOV_TOKEN }}
missing-optional-packages-tests:
name: Tests without optional packages
runs-on: ubuntu-latest
env:
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
strategy:
fail-fast: false
matrix:
include:
- php: '7.2'
dependencies: lowest
symfony-version: 4.4.*
- php: '7.4'
dependencies: highest
- php: '8.0'
dependencies: lowest
symfony-version: 4.4.*
- php: '8.4'
dependencies: highest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov
tools: flex
- name: Setup Problem Matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Remove optional packages
run: composer remove doctrine/dbal doctrine/doctrine-bundle symfony/messenger symfony/twig-bundle symfony/cache symfony/http-client --dev --no-update
- name: Install dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: --prefer-dist
- name: Run tests
run: vendor/bin/phpunit --coverage-clover=build/coverage-report.xml
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
file: build/coverage-report.xml
token: ${{ secrets.CODECOV_TOKEN }}