Repository navigation
201 lines (156 loc) · 4.86 KB
/
Copy pathci.yml
File metadata and controls
201 lines (156 loc) · 4.86 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
name: CI
on: [push, pull_request]
env:
php_version: "8.5"
jobs:
unit:
name: "Unit tests"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php_version }}
- uses: ramsey/composer-install@4.0.0
with:
composer-options: "--no-scripts"
- name: Tests - Unit
run: ./bin/phpunit --testsuite unit
lint:
name: "Linter"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php_version }}
- uses: ramsey/composer-install@4.0.0
with:
composer-options: "--no-scripts"
- name: Tests - CS Fixer
run: ./bin/php-cs-fixer fix --dry-run -vv
phpstan:
name: "PHPStan"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php_version }}
- uses: ramsey/composer-install@4.0.0
with:
composer-options: "--no-scripts"
- name: PHPStan
run: php ./bin/phpstan
functional-no-js:
name: "Functional tests (no JS)"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- name: Create .env from .env.dist
run: cp .env.dist .env
- uses: docker/setup-buildx-action@v4
- name: Build images with GHA cache
uses: docker/bake-action@v7
with:
files: |
compose.yml
compose.override.yml-dist
targets: |
apachephp
apachephptest
load: true
set: |
apachephp.cache-from=type=gha,scope=apachephp-full
apachephp.cache-to=type=gha,scope=apachephp-full,mode=max
apachephptest.cache-from=type=gha,scope=apachephp-full
apachephptest.cache-to=type=gha,scope=apachephp-full,mode=max
- name: Delete symfony cache
run: rm -rf var/cache/test
- name: Tests - Functional (no JS)
run: make test-functional-no-js
- uses: actions/upload-artifact@v7
if: always()
with:
name: Functional tests (no JS) - deprecated log - full
path: var/logs/test.deprecations.log
- uses: actions/upload-artifact@v7
if: always()
with:
name: Functional tests (no JS) - deprecated log - report
path: var/logs/test.deprecations_grouped.log
functional-js:
name: "Functional tests (JS)"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- name: Cache Docker images.
uses: AndreKurait/docker-cache@0.6.0
with:
key: |
docker-${{ runner.os }}-${{ hashFiles(
'compose.yml',
'docker/dockerfiles/apachephp/Dockerfile',
'docker/dockerfiles/mysql/Dockerfile',
'docker/dockerfiles/mysqltest/Dockerfile'
) }}
- name: Delete symfony cache
run: rm -rf var/cache/test
- name: Tests - Functional (JS)
uses: nick-fields/retry@v4
with:
timeout_minutes: 10
max_attempts: 3
command: make test-functional-js
- uses: actions/upload-artifact@v7
with:
name: Functional tests (JS) - deprecated log - full
path: var/logs/test.deprecations.log
- uses: actions/upload-artifact@v7
with:
name: Functional tests (JS) - deprecated log - report
path: var/logs/test.deprecations_grouped.log
integration:
name: "Integration tests"
runs-on: ubuntu-22.04
env:
APACHEPHPTEST_TARGET: base
steps:
- uses: actions/checkout@v6
- name: Create .env from .env.dist
run: cp .env.dist .env
- uses: docker/setup-buildx-action@v4
- name: Build images with GHA cache
uses: docker/bake-action@v7
with:
files: |
compose.yml
compose.override.yml-dist
targets: |
apachephptest
dbtest
load: true
set: |
apachephptest.cache-from=type=gha,scope=apachephp-base
apachephptest.cache-to=type=gha,scope=apachephp-base,mode=max
- name: Delete symfony cache
run: rm -rf var/cache/test
- name: Tests - Integration
run: make test-integration-ci
rector:
name: "Rector"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php_version }}
- uses: ramsey/composer-install@4.0.0
with:
composer-options: "--no-scripts"
- name: Rector
run: php ./bin/rector