Skip to content

Commit

Permalink
Actually use symfony matrix in tests (#97)
Browse files Browse the repository at this point in the history
* Allow matthiasnoback/symfony-dependency-injection-test v5 for full symfony7 compatibility in dev
* Use symfony flex for ensuring symfony version in test matrix
* Exclude Symfony7 + php8.1 combo from the matrix as it is inherently incompatible
* update versions of standard github actions (checkout+cache)
  • Loading branch information
mkilmanas authored May 28, 2024
1 parent ebddd29 commit a502004
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/static-analyse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
CODING_STANDARDS: 1
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v4"

- name: "Setup PHP"
uses: "shivammathur/setup-php@v2"
Expand All @@ -34,7 +34,7 @@ jobs:
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: "Cache Composer dependencies"
uses: "actions/cache@v2"
uses: "actions/cache@v4"
with:
path: |
${{ steps.composer-cache.outputs.dir }}
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ jobs:
- "8.3"
operating-system:
- "ubuntu-latest"
exclude:
- symfony-version: "7.0.*"
php-version: "8.1"

runs-on: ${{ matrix.operating-system }}
env:
COMPOSER_MEMORY_LIMIT: -1
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v4"

- name: "Setup PHP"
uses: "shivammathur/setup-php@v2"
Expand All @@ -40,19 +43,22 @@ jobs:
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: "Cache Composer dependencies"
uses: "actions/cache@v2"
uses: "actions/cache@v4"
with:
path: |
${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-${{ hashFiles('**/composer.lock') }}"
restore-keys: |
php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-
- name: "Require php-coveralls/php-coveralls"
run: "composer global require php-coveralls/php-coveralls"
- name: "Require php-coveralls/php-coveralls and symfony/flex"
run: "composer global require php-coveralls/php-coveralls symfony/flex --no-scripts --no-plugins"

- name: "Enable symfony/flex plugin"
run: "composer global config --no-scripts --no-plugins allow-plugins.symfony/flex true"

- name: "Install dependencies"
run: "composer update -n --prefer-dist"
run: "SYMFONY_REQUIRE='${{ matrix.symfony-version }}' composer update -n --prefer-dist"

- name: "Test"
run: "composer test-coverage"
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"prooph/bookdown-template": "^0.3",
"friendsofphp/php-cs-fixer": "^3.5",
"prooph/php-cs-fixer-config": "^0.5.0",
"matthiasnoback/symfony-dependency-injection-test": "^3.1 || ^4.1",
"matthiasnoback/symfony-dependency-injection-test": "^3.1 || ^4.1 || ^5.1",
"phpstan/phpstan": "^1.5"
},
"minimum-stability": "dev",
Expand Down

0 comments on commit a502004

Please sign in to comment.