-
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.42 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Test
on:
push:
jobs:
php-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.php-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: composer.json
sparse-checkout-cone-mode: false
- uses: typisttech/php-matrix-action@main
id: php-matrix
pest:
runs-on: ubuntu-latest
needs: php-matrix
strategy:
matrix:
php: ${{ fromJSON(needs.php-matrix.outputs.matrix).versions }}
dependency-versions: [lowest, highest]
coverage: [none]
exclude:
- php: ${{ fromJSON(needs.php-matrix.outputs.matrix).highest }}
dependency-versions: highest
coverage: none
include:
- php: ${{ fromJSON(needs.php-matrix.outputs.matrix).highest }}
dependency-versions: highest
coverage: xdebug
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: ${{ matrix.coverage }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependency-versions }}
- run: composer test:with-coverage
if: ${{ matrix.coverage == 'xdebug' }}
- run: composer test:without-coverage
if: ${{ matrix.coverage != 'xdebug' }}