Skip to content

Commit c4f18ad

Browse files
committed
Test matrix
1 parent 62d0988 commit c4f18ad

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

.github/workflows/ci.yml

+14-5
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,26 @@ on:
77
jobs:
88
pest:
99
runs-on: ubuntu-latest
10-
name: PestPHP
10+
strategy:
11+
fail-fast: true
12+
matrix:
13+
php: ['7.4', '8.0']
14+
stability: [prefer-lowest, prefer-stable]
15+
include:
16+
- php: '8.1'
17+
flags: "--ignore-platform-req=php"
18+
stability: prefer-stable
19+
name: Pest - PHP ${{ matrix.php }} - ${{ matrix.stability }}
1120
steps:
1221
- uses: actions/checkout@v2
1322
- uses: shivammathur/setup-php@v2
1423
with:
15-
php-version: '8.0'
24+
php-version: ${{ matrix.php }}
1625
extensions: dom, mbstring, soap, bcmath, pdo_sqlite, intl
1726
coverage: pcov
1827
- uses: ramsey/composer-install@v1
1928
with:
20-
composer-options: "--prefer-dist --optimize-autoloader --ignore-platform-reqs"
29+
composer-options: "--${{ matrix.stability }} --prefer-dist --optimize-autoloader --ignore-platform-reqs"
2130
- name: Run PestPHP
2231
run: vendor/bin/pest --coverage --coverage-clover test-results/pest.xml
2332
env:
@@ -26,10 +35,10 @@ jobs:
2635
AWS_SESSION_TOKEN: fake
2736
- name: Upload coverage to Codecov
2837
if: always()
29-
uses: codecov/codecov-action@v1
38+
uses: codecov/codecov-action@v2
3039
with:
3140
token: ${{ secrets.CODECOV_TOKEN }}
32-
flags: pest
41+
flags: pest-${{ matrix.php }}-${{ matrix.stability }}
3342
file: test-results/pest.xml
3443

3544
larastan:

0 commit comments

Comments
 (0)