-
-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (101 loc) · 2.95 KB
/
test.yml
File metadata and controls
119 lines (101 loc) · 2.95 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Test
on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main
tags:
- '**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions: {}
jobs:
php-matrix:
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.php-matrix.outputs.versions }}
highest: ${{ steps.php-matrix.outputs.highest }}
steps:
- uses: actions/checkout@v6
with:
sparse-checkout: composer.json
sparse-checkout-cone-mode: false
- uses: typisttech/php-matrix-action@v2
id: php-matrix
pest:
needs: php-matrix
strategy:
matrix:
php-version: ${{ fromJSON(needs.php-matrix.outputs.versions) }}
coverage: ['none']
exclude:
- php-version: ${{ needs.php-matrix.outputs.highest }}
coverage: 'none'
include:
- php-version: ${{ needs.php-matrix.outputs.highest }}
coverage: xdebug
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: ${{ matrix.coverage }}
- uses: ramsey/composer-install@v3
with:
dependency-versions: highest
- run: composer pest:unit -- ${COVERAGE} --ci
env:
COVERAGE: ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-unit.xml' || '' }}
- run: composer pest:feature -- ${COVERAGE} --ci
env:
COVERAGE: ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-feature.xml' || '' }}
- run: composer pest:e2e -- ${COVERAGE} --ci
env:
COVERAGE: ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-e2e.xml' || '' }}
- uses: actions/upload-artifact@v6
if: ${{ matrix.coverage == 'xdebug' }}
with:
name: coverage
path: coverage-*.xml
codecov:
needs: pest
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v6
- uses: actions/download-artifact@v7
with:
name: coverage
- uses: codecov/codecov-action@v5
with:
use_oidc: true
fail_ci_if_error: true
disable_search: true
files: coverage-unit.xml
flags: unit
- uses: codecov/codecov-action@v5
with:
use_oidc: true
fail_ci_if_error: true
disable_search: true
files: coverage-feature.xml
flags: feature
- uses: codecov/codecov-action@v5
with:
use_oidc: true
fail_ci_if_error: true
disable_search: true
files: coverage-e2e.xml
flags: e2e
wait-for-all-tests:
needs:
- pest
runs-on: ubuntu-latest
steps:
- run: exit 0