Skip to content

Commit b4c0fa5

Browse files
committed
Test on lowest and highest dependencies
1 parent fa8830c commit b4c0fa5

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

.github/workflows/php.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,44 @@ jobs:
1010
build:
1111

1212
runs-on: ubuntu-latest
13+
continue-on-error: ${{ matrix.experimental }}
1314
strategy:
1415
fail-fast: false
1516
matrix:
16-
php-versions: ['7.2', '7.3', '7.4']
17-
name: Tests with PHP ${{ matrix.php-versions }}
17+
php-version:
18+
- "7.2"
19+
- "7.3"
20+
- "7.4"
21+
dependencies:
22+
- "lowest"
23+
- "highest"
24+
experimental:
25+
- false
26+
include:
27+
- php-version: "8.0"
28+
dependencies: "highest"
29+
composer-options: "--ignore-platform-reqs"
30+
experimental: true
31+
name: Tests with PHP ${{ matrix.php-version }} and ${{ matrix.dependencies }} dependencies
1832

1933
steps:
2034
- uses: actions/checkout@v2
2135

2236
- name: Setup PHP
2337
uses: shivammathur/setup-php@v2
2438
with:
25-
php-version: ${{ matrix.php-versions }}
39+
php-version: ${{ matrix.php-version }}
2640
env:
2741
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2842

2943
- name: Validate composer
3044
run: composer validate
3145

32-
- name: Cache Composer packages
33-
id: composer-cache
34-
uses: actions/cache@v2
46+
- name: Composer install
47+
uses: "ramsey/composer-install@v1"
3548
with:
36-
path: vendor
37-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
38-
restore-keys: |
39-
${{ runner.os }}-composer-
40-
- name: Install dependencies
41-
if: steps.composer-cache.outputs.cache-hit != 'true'
42-
run: composer install --prefer-dist --no-interaction
49+
dependency-versions: "${{ matrix.dependencies }}"
50+
composer-options: "${{ matrix.composer-options }}"
4351

4452
- name: Run unit tests suite
4553
run: vendor/bin/phpunit

0 commit comments

Comments
 (0)