From 0d5975953a406a171da0f1208eb581da6b11ff36 Mon Sep 17 00:00:00 2001 From: Andreas Schempp Date: Tue, 26 Nov 2024 13:47:23 +0100 Subject: [PATCH] Add test matrix for Contao versions --- .github/workflows/ci.yml | 12 ++++++++++-- composer.json | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1d64b8..030540a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,12 +11,13 @@ jobs: uses: 'terminal42/contao-build-tools/.github/workflows/build-tools.yml@main' tests: - name: Unit tests + name: Unit tests (PHP ${{ matrix.php }} / Contao ${{ matrix.contao }}) runs-on: ubuntu-latest strategy: fail-fast: false matrix: - php: [ '8.1', '8.2', '8.3' ] + php: [ '8.1', '8.2', '8.3', '8.4' ] + contao: [ '4.13', '5.3', '5.4' ] steps: - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -27,6 +28,13 @@ jobs: - name: Checkout uses: actions/checkout@v3 + - name: Require Contao version for tests + run: composer require contao/core-bundle:${{ matrix.contao }}.* --dev --no-update + + # Remove this once https://github.com/contao/contao/pull/7751 is merged + - name: Require TestCase version for tests + run: composer require contao/test-case:${{ matrix.contao }}.* --dev --no-update + - name: Install the dependencies run: | composer install --no-interaction --no-progress --no-plugins diff --git a/composer.json b/composer.json index a5cd592..9a809f4 100644 --- a/composer.json +++ b/composer.json @@ -54,8 +54,8 @@ }, "require-dev": { "contao/manager-plugin": "^2.0", - "contao/newsletter-bundle": "^5.0", - "contao/test-case": "^5.3", + "contao/newsletter-bundle": "^4.13 || ^5.0", + "contao/test-case": "^4.13 || ^5.3", "league/flysystem-memory": "^3.25", "phpunit/phpunit": "^9.6", "symfony/expression-language": "^5.4 || ^6.0 || ^7.0",