Skip to content

Commit

Permalink
ci: Enforce the CI to test against Symfony5 (#1817)
Browse files Browse the repository at this point in the history
Depends on #1815.

Adapt the CI to enforce testing against Symfony5 and allowing to easily add a build against Symfony6, preparing #1775.
  • Loading branch information
theofidry committed Feb 5, 2023
1 parent bd7351c commit 54648aa
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@ jobs:
# TODO: include highest & lowest
dependencies: [ locked ]
coverage-driver: [ pcov, xdebug ]
# TODO: include Symfony6 later
symfony-version: [ '5.4.*' ]
include:
- operating-system: windows-latest
php-version: '8.0'
dependencies: locked
coverage-driver: xdebug
symfony-version: '5.4.*'

name: CI on ${{ matrix.operating-system }} with PHP ${{ matrix.php-version }} (${{ matrix.dependencies }}), using ${{ matrix.coverage-driver }}
name: Tests on ${{ matrix.operating-system }} with PHP ${{ matrix.php-version }} (${{ matrix.dependencies }}; Symfony ${{ matrix.symfony-version }}), using ${{ matrix.coverage-driver }}

steps:
- name: Checkout code
Expand All @@ -45,6 +48,17 @@ jobs:
if: matrix.dependencies != 'locked'
run: composer config --unset platform.php

- name: Enforce the Symfony version used
if: ${{ matrix.symfony-version }}
run: composer config extra.symfony.require ${{ matrix.symfony-version }}

# See https://symfony.com/doc/current/bundles/best_practices.html#require-a-specific-symfony-version
- name: Install Flex
if: ${{ matrix.symfony-version }}
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins symfony/flex
- name: Get composer cache directory
id: composer-cache
shell: bash
Expand Down

0 comments on commit 54648aa

Please sign in to comment.