Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,19 @@ jobs:
enable_yamllinter: true

unit-tests-linux:
name: "Unit tests, PHP ${{ matrix.php-versions }}, ${{ matrix.operating-system }}"
name: "Tests, PHP ${{ matrix.php-versions }}, symfony ${{ matrix.symfony }}, ${{ matrix.operating-system }}"
runs-on: ${{ matrix.operating-system }}
needs: [phplinter, linter]
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
php-versions: ['8.1', '8.2', '8.3', '8.4']
php-versions: ['8.2', '8.3', '8.4']
symfony: ['~6.4.0', '~7.1.0', '^7.3']
include:
- operating-system: 'ubuntu-latest'
php-versions: '8.1'
symfony: '~6.4.0'
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this full version range is a bit overkill, but it confirms that we can use ^7.1 rather than ^7.3 in composer.json.
In fact ^7.0 would also work, but Drupal only ever needs ^7.1 starting at drupal/core:11.0.0.


steps:
- name: Setup PHP, with composer and extensions
Expand All @@ -71,6 +76,9 @@ jobs:

- uses: actions/checkout@v4

- name: "Require symfony/finder:${{ matrix.symfony }}"
run: composer require --no-update symfony/finder:${{ matrix.symfony }}

- name: Get composer cache directory
run: echo COMPOSER_CACHE="$(composer config cache-files-dir)" >> "$GITHUB_ENV"

Expand All @@ -85,22 +93,22 @@ jobs:
run: composer install --no-progress --prefer-dist --optimize-autoloader

- name: Run unit tests with coverage
if: ${{ matrix.php-versions == '8.4' }}
if: ${{ matrix.php-versions == '8.4' && matrix.symfony == '^7.3' }}
run: vendor/bin/phpunit

- name: Run unit tests (no coverage)
if: ${{ matrix.php-versions != '8.4' }}
if: ${{ matrix.php-versions != '8.4' || matrix.symfony != '^7.3' }}
run: vendor/bin/phpunit --no-coverage

- name: Save coverage data
if: ${{ matrix.php-versions == '8.4' }}
if: ${{ matrix.php-versions == '8.4' && matrix.symfony == '^7.3' }}
uses: actions/upload-artifact@v4
with:
name: coverage-data
path: ${{ github.workspace }}/build

unit-tests-windows:
name: "Unit tests, PHP ${{ matrix.php-versions }}, ${{ matrix.operating-system }}"
name: "Tests, PHP ${{ matrix.php-versions }}, ${{ matrix.operating-system }}"
runs-on: ${{ matrix.operating-system }}
needs: [phplinter, linter]
strategy:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

"simplesamlphp/assert": "~1.8.1",
"simplesamlphp/composer-xmlprovider-installer": "~1.0.2",
"symfony/finder": "~6.4.0"
"symfony/finder": "~6.4.0 || ^7.1"
},
"require-dev": {
"simplesamlphp/simplesamlphp-test-framework": "~1.9.2"
Expand Down