From 164eee4b0456faa12a9e95a6f429e1a8b60df59d Mon Sep 17 00:00:00 2001 From: Vasek Purchart Date: Wed, 4 Dec 2024 16:19:09 +0100 Subject: [PATCH] run tests with specific Symfony versions --- .github/workflows/ci.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a86a374..9ec9111 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -127,7 +127,7 @@ jobs: run: 'bin/phing composer-dependencies' tests: - name: 'Tests - PHP ${{ matrix.php-version }}, ${{ matrix.composer-dependencies }} dependencies' + name: 'Tests - PHP ${{ matrix.php-version }}, Symfony: ${{ matrix.symfony-version}}, Composer ${{ matrix.composer-dependencies }} dependencies' needs: 'lint' runs-on: 'ubuntu-latest' @@ -138,6 +138,12 @@ jobs: - '7.2' - '7.3' - '7.4' + symfony-version: + # - '3.0' matthiasnoback/symfony-dependency-injection-test 4.2.1 requires symfony/yaml ^3.4 || ^4.4 || ^5.0 + # - '3.1' matthiasnoback/symfony-dependency-injection-test 4.2.1 requires symfony/yaml ^3.4 || ^4.4 || ^5.0 + # - '3.2' matthiasnoback/symfony-dependency-injection-test 4.2.1 requires symfony/yaml ^3.4 || ^4.4 || ^5.0 + # - '3.3' matthiasnoback/symfony-dependency-injection-test 4.2.1 requires symfony/yaml ^3.4 || ^4.4 || ^5.0 + - '3.4' composer-dependencies: - 'highest' - 'lowest' @@ -163,6 +169,18 @@ jobs: uses: 'ramsey/composer-install@3.0.0' with: dependency-versions: '${{ matrix.composer-dependencies }}' + - + name: 'Install specific versions' + env: + COMPOSER_PREFER_LOWEST: ${{ matrix.composer-dependencies == 'lowest' && 1 || 0 }} + run: | + composer update \ + --ansi \ + --with 'symfony/config=${{ matrix.symfony-version }}.*' \ + --with 'symfony/console=${{ matrix.symfony-version }}.*' \ + --with 'symfony/dependency-injection=${{ matrix.symfony-version }}.*' \ + --with 'symfony/http-kernel=${{ matrix.symfony-version }}.*' \ + --with 'symfony/yaml=${{ matrix.symfony-version }}.*' - name: 'Run tests' run: 'bin/phing create-dirs tests' @@ -171,7 +189,7 @@ jobs: env: COVERALLS_REPO_TOKEN: '${{ secrets.GITHUB_TOKEN }}' COVERALLS_PARALLEL: true - COVERALLS_FLAG_NAME: 'php-${{ matrix.php-version }}+${{ matrix.composer-dependencies }}-dependencies' + COVERALLS_FLAG_NAME: 'php-${{ matrix.php-version }}+symfony-${{ matrix.symfony-version }}+${{ matrix.composer-dependencies }}-dependencies' run: | wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.3/php-coveralls.phar php php-coveralls.phar --verbose --config build/coveralls.yml