35
35
compose.yaml
36
36
compose.override.yaml
37
37
set : |
38
- *.cache-from=type=gha,scope=${{github.ref}}
38
+ *.cache-from=type=gha,scope=${{ github.ref }}
39
39
*.cache-from=type=gha,scope=refs/heads/main
40
- *.cache-to=type=gha,scope=${{github.ref}},mode=max
40
+ *.cache-to=type=gha,scope=${{ github.ref }},mode=max
41
41
-
42
42
name : Start services
43
43
run : docker compose up --wait --no-build
71
71
-
72
72
name : Run PHPStan
73
73
run : docker compose exec -T php vendor/bin/phpstan --memory-limit=256M
74
- -
75
- name : Lint PWA
76
- run : docker compose exec -T pwa pnpm lint
77
74
78
75
# run e2e tests iso-prod
79
76
e2e-tests :
@@ -113,10 +110,10 @@ jobs:
113
110
compose.yaml
114
111
compose.prod.yaml
115
112
set : |
116
- *.cache-from=type=gha,scope=${{github.ref}}-e2e
117
- *.cache-from=type=gha,scope=${{github.ref}}
113
+ *.cache-from=type=gha,scope=${{ github.ref }}-e2e
114
+ *.cache-from=type=gha,scope=${{ github.ref }}
118
115
*.cache-from=type=gha,scope=refs/heads/main
119
- *.cache-to=type=gha,scope=${{github.ref}}-e2e,mode=max
116
+ *.cache-to=type=gha,scope=${{ github.ref }}-e2e,mode=max
120
117
-
121
118
name : Start Services
122
119
run : docker compose up --wait --no-build
@@ -131,6 +128,7 @@ jobs:
131
128
run : docker compose run --rm php bin/console doctrine:fixtures:load --no-interaction
132
129
-
133
130
name : Cache Playwright Binaries
131
+ id : playwright-cache
134
132
uses : actions/cache@v3
135
133
with :
136
134
path : ~/.cache/ms-playwright
@@ -139,15 +137,29 @@ jobs:
139
137
name : Install PNPM
140
138
uses : pnpm/action-setup@v2
141
139
with :
142
- version : 8.6.2
140
+ version : 8
141
+ -
142
+ name : Cache PNPM
143
+ uses : actions/cache@v3
144
+ with :
145
+ path : ${{ env.PNPM_HOME }}
146
+ key : ${{ runner.os }}-pnpm-${{ github.run_id }}
147
+ restore-keys : |
148
+ ${{ runner.os }}-pnpm-
143
149
-
144
150
name : Install Dependencies
145
151
working-directory : pwa
146
152
run : pnpm install
147
153
-
148
- name : Install Playwright Browsers
154
+ name : Install Playwright Browsers with Deps
155
+ if : steps.playwright-cache.outputs.cache-hit != 'true'
149
156
working-directory : pwa
150
157
run : pnpm exec playwright install --with-deps
158
+ -
159
+ name : Install Playwright Browsers
160
+ if : steps.playwright-cache.outputs.cache-hit == 'true'
161
+ working-directory : pwa
162
+ run : pnpm exec playwright install
151
163
-
152
164
name : Run Playwright @read
153
165
working-directory : pwa
@@ -168,14 +180,94 @@ jobs:
168
180
path : pwa/test-results
169
181
170
182
lint :
171
- name : Docker Lint
183
+ name : Lint
172
184
runs-on : ubuntu-latest
173
185
steps :
174
186
-
175
187
name : Checkout
176
188
uses : actions/checkout@v4
189
+
190
+ # Lint Dockerfiles
177
191
-
178
192
name : Lint Dockerfiles
179
193
180
194
with :
181
195
recursive : true
196
+
197
+ # Lint API
198
+ -
199
+ name : PHP CS Fixer Cache
200
+ uses : actions/cache@v3
201
+ with :
202
+ path : api/.php-cs-fixer.cache
203
+ key : ${{ runner.OS }}-phpcsfixer-${{ github.sha }}
204
+ restore-keys : |
205
+ ${{ runner.OS }}-phpcsfixer-
206
+ -
207
+ name : Get API changed files
208
+ id : api-changed-files
209
+ uses : tj-actions/changed-files@v38
210
+ -
211
+ name : Get Extra Arguments for PHP-CS-Fixer
212
+ id : phpcs-intersection
213
+ run : |
214
+ CHANGED_FILES=$(echo "${{ steps.changed-files.outputs.all_changed_and_modified_files }}" | tr ' ' '\n')
215
+ if ! echo "${CHANGED_FILES}" | grep -qE "^api\/(\\.php-cs-fixer(\\.dist)?\\.php|composer\\.lock)$"; then EXTRA_ARGS=$(printf -- '--path-mode=intersection\n--\n%s' "${CHANGED_FILES}"); else EXTRA_ARGS=''; fi
216
+ echo "PHPCS_EXTRA_ARGS<<EOF" >> $GITHUB_ENV
217
+ echo "$EXTRA_ARGS" >> $GITHUB_ENV
218
+ echo "EOF" >> $GITHUB_ENV
219
+ -
220
+ name : Lint API
221
+ uses : docker://oskarstark/php-cs-fixer-ga
222
+ with :
223
+ args : --config=api/.php-cs-fixer.dist.php -v --dry-run --stop-on-violation --using-cache=no ${{ env.PHPCS_EXTRA_ARGS }}"
224
+
225
+ # Lint PWA
226
+ -
227
+ name : Install PNPM
228
+ uses : pnpm/action-setup@v2
229
+ with :
230
+ version : 8
231
+ -
232
+ name : Cache PNPM
233
+ uses : actions/cache@v3
234
+ with :
235
+ path : ${{ env.PNPM_HOME }}
236
+ key : ${{ runner.os }}-pnpm-${{ github.run_id }}
237
+ restore-keys : |
238
+ ${{ runner.os }}-pnpm-
239
+ -
240
+ name : Install Dependencies
241
+ working-directory : pwa
242
+ run : pnpm install
243
+ -
244
+ name : Lint PWA
245
+ working-directory : pwa
246
+ run : pnpm lint
247
+
248
+ # Lint HELM
249
+ -
250
+ name : Cache Helm Dependencies
251
+ uses : actions/cache@v3
252
+ with :
253
+ path : helm/api-platform/charts/
254
+ key : ${{ runner.os }}-helm-dependencies-${{ github.run_id }}
255
+ restore-keys : |
256
+ ${{ runner.os }}-helm-dependencies-
257
+ -
258
+ name : Build Helm Dependencies
259
+ run : |
260
+ helm repo add bitnami https://charts.bitnami.com/bitnami/
261
+ helm repo add stable https://charts.helm.sh/stable/
262
+ helm dependency build ./helm/api-platform
263
+ -
264
+ name : Lint Helm
265
+ run : helm lint ./helm/api-platform/
266
+
267
+ # Lint Markdown Docs
268
+ -
269
+ name : Lint changelog file
270
+ uses : docker://avtodev/markdown-lint:v1
271
+ with :
272
+ config : ' docs/.markdown-lint.yaml'
273
+ args : ' docs/**/*.md'
0 commit comments