-
-
Notifications
You must be signed in to change notification settings - Fork 2
132 lines (105 loc) · 3.34 KB
/
Copy pathtests.yaml
File metadata and controls
132 lines (105 loc) · 3.34 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
120
121
122
123
124
125
126
127
128
129
130
131
132
# yamllint disable rule:line-length
# yamllint disable rule:braces
name: Tests
on:
pull_request:
push:
branches:
- main
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
tests:
permissions:
contents: read
runs-on: ubuntu-latest
env:
SYMFONY_REQUIRE: ${{ matrix.symfony-require }}
strategy:
matrix:
php-version: ['8.3', '8.3', '8.4', '8.5']
symfony-require:
- '6.4.*'
- '7.4.*'
- '8.*'
exclude:
- php-version: '8.3'
symfony-require: '8.*'
name: Unit tests on PHP ${{ matrix.php-version }} with Symfony ${{ matrix.symfony-require }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup PHP
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
tools: composer, flex
- name: Install Composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
- name: Get the PhpSpec PHAR
uses: ./.github/actions/get-phar
with:
tool-name: phpspec
phar-path: var/tools/phpspec.phar
version-file: .tools/phpspec-version
- name: Run tests
run: make test-unit
e2e:
permissions:
contents: read
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- '8.3'
- '8.4'
# https://github.com/infection/infection/issues/2885
#- '8.5'
name: End-to-end on PHP ${{ matrix.php-version }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup PHP
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
tools: composer
- name: Install Composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
- name: Install the e2e scenario Composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
working-directory: tests/e2e/PhpSpec
- name: Get the Infection PHAR
uses: ./.github/actions/get-phar
with:
tool-name: infection
phar-path: var/tools/infection.phar
version-file: .tools/infection-version
- name: Get the PhpSpec PHAR
uses: ./.github/actions/get-phar
with:
tool-name: phpspec
phar-path: var/tools/phpspec.phar
version-file: .tools/phpspec-version
- name: Run tests
run: make test-e2e
# This is a meta job to avoid to have to constantly change the protection rules
# whenever we touch the matrix.
tests-status:
name: Tests Status
runs-on: ubuntu-latest
timeout-minutes: 30
needs: tests
if: always()
steps:
- name: Successful run
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Failing run
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1