Put dev versions in env variables in test workflow #108
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: "Tests" | ||
on: | ||
- "push" | ||
- "pull_request" | ||
env: | ||
SYMFONY_DEV: '7.3.*' | ||
PHP_DEV: '8.5' | ||
jobs: | ||
tests: | ||
runs-on: "ubuntu-latest" | ||
continue-on-error: "${{ matrix.php-versions == env.PHP_DEV || matrix.symfony == env.SYMFONY_DEV }}" | ||
Check failure on line 15 in .github/workflows/tests.yml
|
||
strategy: | ||
matrix: | ||
php-versions: ['8.2', '8.3', '8.4', '8.5'] | ||
symfony: | ||
- '6.4.*' | ||
- '7.0.*' | ||
- '7.1.*' | ||
- '7.2.*' | ||
- '7.3.*' | ||
steps: | ||
- uses: "actions/checkout@v4" | ||
- name: "Cache Composer packages" | ||
id: "composer-cache" | ||
uses: "actions/cache@v4" | ||
with: | ||
path: "vendor" | ||
key: ${{ runner.os }}-php-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
"${{ runner.os }}-php-" | ||
- name: "Setup PHP Action" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
php-version: "${{ matrix.php-versions }}" | ||
extensions: "intl, xdebug" | ||
- name: "Adapt dependencies" | ||
if: ${{ matrix.symfony == env.SYMFONY_DEV }} | ||
run: "composer config minimum-stability dev" | ||
- name: "Install dependencies" | ||
run: | | ||
composer require --update-with-all-dependencies \ | ||
symfony/http-kernel:${{ matrix.symfony }} \ | ||
symfony/http-foundation:${{ matrix.symfony }} \ | ||
symfony/dependency-injection:${{ matrix.symfony }} \ | ||
symfony/config:${{ matrix.symfony }} \ | ||
symfony/twig-bundle:${{ matrix.symfony }} | ||
- name: "Unit + Integration" | ||
run: "vendor/bin/phpunit" | ||
- name: "Mutation tests" | ||
run: "vendor/bin/infection --min-msi=95 --no-progress --threads=5" |