-
Notifications
You must be signed in to change notification settings - Fork 3
573 lines (571 loc) · 24 KB
/
CI.yaml
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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
name: CI
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
on:
push:
branches:
- '**'
jobs:
log-everything:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/workflows/logObjects
name: log everything
with:
task: "log-everything"
github: ${{ toJSON(github) }}
env: ${{ toJSON(env) }}
job: ${{ toJSON(job) }}
steps: ${{ toJSON(steps) }}
runner: ${{ toJSON(runner) }}
strategy: ${{ toJSON(strategy) }}
matrix: ${{ toJSON(matrix) }}
needs: ${{ toJSON(needs) }}
inputs: ${{ toJSON(inputs) }}
vars: ${{ toJSON(vars) }}
rebuild-docker-images:
uses: ./.github/workflows/RebuildDockerImages.yaml
frontend-component-tests:
runs-on: ubuntu-latest
if: github.event_name != 'workflow_dispatch'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/workflows/logObjects
name: log job contexts
with:
task: "frontend-component-tests"
env: ${{ toJSON(env) }}
job: ${{ toJSON(job) }}
steps: ${{ toJSON(steps) }}
strategy: ${{ toJSON(strategy) }}
matrix: ${{ toJSON(matrix) }}
needs: ${{ toJSON(needs) }}
inputs: ${{ toJSON(inputs) }}
vars: ${{ toJSON(vars) }}
- uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
with:
distribution: temurin
java-version: 21
cache: gradle
- name: Frontend component testing
run: timeout -v 15m ./testing/execute_frontend_component_tests.sh
# Uncomment the lines below to enable debug logging for investigating flaky component tests.
# env:
# DEBUG: cypress:*
if: always()
- name: Upload Cypress Component Testing Logs
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: componentTestCypressLogs
path: cypress-component-test-logs.log
- name: Upload lcov Exec Results
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: lcovResults-frontend
path: ./dataland-frontend/coverage/*.info
- name: Upload FE Cypress Results
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: cypress-component-tests
path: ./dataland-frontend/cypress
framework-toolbox-list-frameworks:
runs-on: ubuntu-latest
outputs:
frameworkList: ${{ steps.listFrameworks.outputs.frameworkList }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/workflows/logObjects
name: log job contexts
with:
task: "framework-toolbox-list-frameworks"
env: ${{ toJSON(env) }}
job: ${{ toJSON(job) }}
steps: ${{ toJSON(steps) }}
strategy: ${{ toJSON(strategy) }}
matrix: ${{ toJSON(matrix) }}
needs: ${{ toJSON(needs) }}
inputs: ${{ toJSON(inputs) }}
vars: ${{ toJSON(vars) }}
- uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
with:
distribution: temurin
java-version: 21
cache: gradle
- name: Execute framework-toolbox to list all frameworks
id: listFrameworks
run: |
./gradlew dataland-framework-toolbox:runCreateFrameworkList --no-daemon --stacktrace
echo "frameworkList=$(<./dataland-framework-toolbox/build/framework-list.json)" >> "$GITHUB_OUTPUT"
- name: Upload JaCoCo Exec Results
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: JaCoCoResultsToolbox-list
path: ./dataland-framework-toolbox/build/jacoco/runCreateFrameworkList.exec
framework-toolbox-consistency-tests:
runs-on: ubuntu-latest
needs:
- framework-toolbox-list-frameworks
strategy:
fail-fast: false
matrix:
framework: ${{ fromJson(needs.framework-toolbox-list-frameworks.outputs.frameworkList) }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/workflows/logObjects
name: log job contexts
with:
task: "framework-toolbox-consistency-test-${{ matrix.framework }}"
env: ${{ toJSON(env) }}
job: ${{ toJSON(job) }}
steps: ${{ toJSON(steps) }}
strategy: ${{ toJSON(strategy) }}
matrix: ${{ toJSON(matrix) }}
needs: ${{ toJSON(needs) }}
inputs: ${{ toJSON(inputs) }}
vars: ${{ toJSON(vars) }}
- uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
with:
distribution: temurin
java-version: 21
cache: gradle
- name: Build framework '${{ matrix.framework }}'
run: ./gradlew dataland-framework-toolbox:runCoverage --args='${{ matrix.framework }}' --no-daemon --stacktrace
env:
DATALAND_QA_SERVICE_CLIENT_SECRET: "dummy"
- name: Verify that there are no changed (git-tracked) files
run: ./testing/verify_that_no_git_tracked_files_changed.sh
- run: mv ./dataland-framework-toolbox/build/jacoco/runCoverage.exec ./dataland-framework-toolbox/build/jacoco/runCoverage-${{ matrix.framework }}.exec
if: always()
- name: Upload JaCoCo Exec Results
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: JaCoCoResultsToolbox-${{ matrix.framework }}
path: ./dataland-framework-toolbox/build/jacoco/runCoverage-${{ matrix.framework }}.exec
framework-toolbox-integration-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/workflows/logObjects
name: log job contexts
with:
task: "framework-toolbox-integration-tests"
env: ${{ toJSON(env) }}
job: ${{ toJSON(job) }}
steps: ${{ toJSON(steps) }}
strategy: ${{ toJSON(strategy) }}
matrix: ${{ toJSON(matrix) }}
needs: ${{ toJSON(needs) }}
inputs: ${{ toJSON(inputs) }}
vars: ${{ toJSON(vars) }}
- uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
with:
distribution: temurin
java-version: 21
cache: gradle
- name: Execute framework-toolbox integrationTest
run: ./gradlew dataland-framework-toolbox:integrationTest --no-daemon --stacktrace
- name: Upload JaCoCo Exec Results
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: JaCoCoResultsUnitTests-Toolbox
path: ./**/*.exec
gradle-based-tests:
runs-on: ubuntu-latest
if: github.event_name != 'workflow_dispatch'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/workflows/logObjects
name: log job contexts
with:
task: "gradle-based-tests"
env: ${{ toJSON(env) }}
job: ${{ toJSON(job) }}
steps: ${{ toJSON(steps) }}
strategy: ${{ toJSON(strategy) }}
matrix: ${{ toJSON(matrix) }}
needs: ${{ toJSON(needs) }}
inputs: ${{ toJSON(inputs) }}
vars: ${{ toJSON(vars) }}
- uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
with:
distribution: temurin
java-version: 21
cache: gradle
- name: assemble project
run: ./gradlew assemble --no-daemon --stacktrace
- name: Execute linting and detekt
run: ./gradlew ktlintCheck detekt --no-daemon --stacktrace
if: always()
- name: Execute unit tests for all spring services
run: |
sudo apt update && sudo apt install libreoffice
#TODO: look into a more elegant solution for the line below
./gradlew :dataland-backend:test :dataland-backend-utils:test :dataland-internal-storage:test :dataland-api-key-manager:test :dataland-qa-service:test :dataland-document-manager:test :dataland-batch-manager:test :dataland-community-manager:test :dataland-email-service:test :dataland-framework-toolbox:test :dataland-external-storage:test :dataland-data-exporter:test :dataland-specification-service:test :dataland-specification-lib:test --no-daemon --stacktrace
if: always()
env:
MAILJET_API_ID: ${{ secrets.MAILJET_API_ID }}
MAILJET_API_SECRET: ${{ secrets.MAILJET_API_SECRET }}
NOTIFICATION_INTERNAL_RECEIVERS: "[email protected]"
NOTIFICATION_INTERNAL_CC: "[email protected]"
DATALAND_QA_SERVICE_CLIENT_SECRET: "password"
DATALAND_BACKEND_CLIENT_SECRET: "password"
DATALAND_DOCUMENT_MANAGER_CLIENT_SECRET: "password"
DATALAND_EMAIL_SERVICE_CLIENT_SECRET: "password"
- name: Frontend linting
run: ./gradlew :dataland-frontend:generateClients :dataland-frontend:npm_run_lintci :dataland-frontend:npm_run_formatci :dataland-frontend:npm_run_checkdependencies --no-daemon --stacktrace
if: always()
- name: Frontend type checking
run: ./gradlew :dataland-frontend:npm_run_typecheck dataland-frontend:npm_run_checkcypresscompilation --no-daemon --stacktrace
if: always()
- name: Keycloak theme linting
run: ./gradlew :dataland-keycloak:dataland_theme:login:npm_run_lintci --no-daemon --stacktrace
if: always()
- name: Verify that Fake Fixtures are Up-To-Date
if: always()
run: testing/verify_that_fake_fixtures_are_up_to_date.sh
- name: verify OpenApi Files
if: always()
env:
DATALAND_QA_SERVICE_CLIENT_SECRET: "password"
DATALAND_COMMUNITY_MANAGER_CLIENT_SECRET: "password"
DATALAND_BACKEND_CLIENT_SECRET: "password"
DATALAND_DOCUMENT_MANAGER_CLIENT_SECRET: "password"
DATALAND_EMAIL_SERVICE_CLIENT_SECRET: "password"
run: testing/verifyOpenApiFiles.sh
- name: verify no it.only exists
if: always()
run: |
! grep -ri "it\.only" dataland-frontend/tests/
- name: Upload Test and Coverage Reports
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: GradleReports
path: |
./**/build/reports
./**/coverage
- name: Upload JaCoCo Exec Results
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: JaCoCoResultsUnitTests-Gradle
path: ./**/*.exec
- uses: ./.github/workflows/dockerLogs
if: always()
with:
subfolder: 'unit-tests-backend'
e2e-tests:
runs-on: ubuntu-latest
if: github.event_name != 'workflow_dispatch'
needs:
- rebuild-docker-images
strategy:
fail-fast: false
matrix:
include:
- testExecutor: "CYPRESS"
testGroup: 1
- testExecutor: "CYPRESS"
testGroup: 2
- testExecutor: "CYPRESS"
testGroup: 3
- testExecutor: "CYPRESS"
testGroup: 4
- testExecutor: "E2ETESTS"
testGroup: 0
- testExecutor: "RESTARTABILITY"
testGroup: 100
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/workflows/downloadImageVersions
- uses: ./.github/workflows/logObjects
name: log job contexts
with:
task: e2e-tests-${{ matrix.testGroup }}
env: ${{ toJSON(env) }}
job: ${{ toJSON(job) }}
steps: ${{ toJSON(steps) }}
strategy: ${{ toJSON(strategy) }}
matrix: ${{ toJSON(matrix) }}
needs: ${{ toJSON(needs) }}
inputs: ${{ toJSON(inputs) }}
vars: ${{ toJSON(vars) }}
- name: Retrieve SSL certificates for local-dev.dataland.com
run: ./testing/retrieve_ssl_certs.sh
env:
TARGETSERVER_HOST_KEYS: ${{ vars.TARGETSERVER_HOST_KEYS }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Execute E2E Tests
run: ./testing/e2e_test_launcher.sh
env:
KEYCLOAK_FRONTEND_URL: "https://local-dev.dataland.com/keycloak"
KEYCLOAK_DB_PASSWORD: "password"
BACKEND_DB_PASSWORD: "password"
API_KEY_MANAGER_DB_PASSWORD: "password"
INTERNAL_STORAGE_DB_PASSWORD: "password"
DOCUMENT_MANAGER_DB_PASSWORD: "password"
QA_SERVICE_DB_PASSWORD: "password"
COMMUNITY_MANAGER_DB_PASSWORD: "password"
EMAIL_SERVICE_DB_PASSWORD: "password"
PGADMIN_PASSWORD: "password"
KEYCLOAK_DATALAND_ADMIN_VALUE: "Dic1AEUG0nKnZ8me/3GMxgfyUmbwmJwDWNXkC7arLcij2BDB0xeOgk8ZpfZPKmFNikr9Is5I4+Nyk3MB9zs7mA=="
KEYCLOAK_DATALAND_ADMIN_SALT: "K9nzg086pCNjq8dxl84GZg=="
KEYCLOAK_DATALAND_ADMIN_PASSWORD: "password"
DATALAND_QA_SERVICE_CLIENT_SECRET: "password"
DATALAND_BATCH_MANAGER_CLIENT_SECRET: "password"
DATALAND_COMMUNITY_MANAGER_CLIENT_SECRET: "password"
DATALAND_EMAIL_SERVICE_CLIENT_SECRET: "password"
DATALAND_DOCUMENT_MANAGER_CLIENT_SECRET: "password"
DATALAND_BACKEND_CLIENT_SECRET: "password"
DATALAND_DATA_EXPORTER_CLIENT_SECRET: "password"
KEYCLOAK_READER_VALUE: "Dic1AEUG0nKnZ8me/3GMxgfyUmbwmJwDWNXkC7arLcij2BDB0xeOgk8ZpfZPKmFNikr9Is5I4+Nyk3MB9zs7mA=="
KEYCLOAK_READER_SALT: "K9nzg086pCNjq8dxl84GZg=="
KEYCLOAK_READER_PASSWORD: "password"
KEYCLOAK_UPLOADER_VALUE: "Dic1AEUG0nKnZ8me/3GMxgfyUmbwmJwDWNXkC7arLcij2BDB0xeOgk8ZpfZPKmFNikr9Is5I4+Nyk3MB9zs7mA=="
KEYCLOAK_UPLOADER_SALT: "K9nzg086pCNjq8dxl84GZg=="
KEYCLOAK_UPLOADER_PASSWORD: "password"
KEYCLOAK_REVIEWER_VALUE: "Dic1AEUG0nKnZ8me/3GMxgfyUmbwmJwDWNXkC7arLcij2BDB0xeOgk8ZpfZPKmFNikr9Is5I4+Nyk3MB9zs7mA=="
KEYCLOAK_REVIEWER_SALT: "K9nzg086pCNjq8dxl84GZg=="
KEYCLOAK_REVIEWER_PASSWORD: "password"
KEYCLOAK_PREMIUM_USER_VALUE: "Dic1AEUG0nKnZ8me/3GMxgfyUmbwmJwDWNXkC7arLcij2BDB0xeOgk8ZpfZPKmFNikr9Is5I4+Nyk3MB9zs7mA=="
KEYCLOAK_PREMIUM_USER_SALT: "K9nzg086pCNjq8dxl84GZg=="
KEYCLOAK_PREMIUM_USER_PASSWORD: "password"
KEYCLOAK_ADMIN: "admin"
KEYCLOAK_ADMIN_PASSWORD: "password"
KEYCLOAK_GOOGLE_ID: "irrelevant_in_ci"
KEYCLOAK_GOOGLE_SECRET: "irrelevant_in_ci"
PROXY_PRIMARY_URL: local-dev.dataland.com
PROXY_LETSENCRYPT_PATH: /etc/letsencrypt/local-dev.dataland.com
PROXY_IMAGE: ghcr.io/d-fine/dataland/dataland_inbound_proxy:${{ env.DATALAND_INBOUND_PROXY_VERSION }}
CYPRESS_EXECUTION_ENVIRONMENT: "ci"
CYPRESS_TEST_GROUP: ${{ matrix.testGroup }}
CYPRESS_IGNORE_EXTERNAL_STORAGE: "false"
TEST_EXECUTOR: ${{ matrix.testExecutor }}
COMPOSE_DOCKER_CLI_BUILD: 1
DOCKER_BUILDKIT: 1
MAILJET_API_ID: ${{ secrets.MAILJET_API_ID }}
MAILJET_API_SECRET: ${{ secrets.MAILJET_API_SECRET }}
NOTIFICATION_INTERNAL_RECEIVERS: "[email protected]"
NOTIFICATION_INTERNAL_CC: "[email protected]"
RABBITMQ_USER: "admin"
RABBITMQ_PASS: "dataland"
RABBITMQ_PASS_HASH: "1s3+3kZqRTAgidTV6NE+adO3ja5NFNQZHa9MBwhJ0Kx7Fw6F"
FRONTEND_LOCATION_CONFIG: "Test"
INTERNAL_EURODATCLIENT_URL: "http://dummy-eurodat-client:8080"
BACKEND_URL: ${{ secrets.BACKEND_URL }}
IGNORE_EXTERNAL_STORAGE_ERROR: "false"
COMMUNITY_MANAGER_NOTIFICATION_SERVICE_FEATURE_FLAG: true
DATA_EXPORTER_OUTPUT_DIRECTORY: "/tmp"
- name: Upload JaCoCo Exec Results
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: JaCoCoResultsE2ETest-${{ matrix.testGroup }}
path: ./*.exec
- name: Upload lcov Exec Results
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: lcovResults-${{ matrix.testGroup }}
path: ./*.info
- name: Upload E2E Test and Cypress Reports
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: e2eTestReports-${{ matrix.testGroup }}
path: |
./cypress
./coverage
./reports
- name: Upload database dumps
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: e2eTestDatabaseDumps-${{ matrix.testGroup }}
path: ./dbdumps/
- uses: ./.github/workflows/dockerLogs
if: always()
with:
subfolder: 'e2etests_testgroup_${{ matrix.testGroup }}'
sonar:
runs-on: ubuntu-latest
if: ${{ !cancelled() }}
needs:
- e2e-tests
- gradle-based-tests
- frontend-component-tests
- framework-toolbox-integration-tests
- framework-toolbox-consistency-tests
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- uses: ./.github/workflows/logObjects
name: log job contexts
with:
task: "sonar"
env: ${{ toJSON(env) }}
job: ${{ toJSON(job) }}
steps: ${{ toJSON(steps) }}
strategy: ${{ toJSON(strategy) }}
matrix: ${{ toJSON(matrix) }}
needs: ${{ toJSON(needs) }}
inputs: ${{ toJSON(inputs) }}
vars: ${{ toJSON(vars) }}
- uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
with:
distribution: temurin
java-version: 21
cache: gradle
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
name: JaCoCoResultsUnitTests
with:
pattern: JaCoCoResultsUnitTests-*
merge-multiple: true
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
name: JaCoCoResultsE2ETest
with:
pattern: JaCoCoResultsE2ETest-*
merge-multiple: true
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
with:
pattern: JaCoCoResultsToolbox-*
merge-multiple: true
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
name: lcovResults
with:
pattern: lcovResults-*
path: fe-coverage
merge-multiple: true
- name: Prepare Repo for Sonar
if: ${{ !cancelled() }}
run: |
./gradlew compileKotlin compileJava compileTestKotlin compileTestJava npmSetup npmInstall generateClients npm_run_build \
-x detekt -x ktlintCheck -x jacocoTestReport -x kaptKotlin -x kaptTestKotlin -x kaptGenerateStubsTestKotlin -x kaptGenerateStubsKotlin \
--no-daemon --stacktrace
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: jacocoTestReport
if: ${{ !cancelled() }}
# jacocoTestReport must be executed in a gradle-job that is started AFTER classes are compiled - because
# the build.gradle.kts only looks for .class files at start of gradle (and not at start of task).
run: |
# the next line at some point fixed the problem of missing coverage reports on our java processes
# we left it here, even though removing it again did not break the coverage reports for java processes
for file in *.exec; do if [[ -f $file ]]; then project=$(echo $file | awk -F '-bootRun-' '{print $1}'); mkdir -p ./dataland-$project/build/jacoco; mv $file ./dataland-$project/build/jacoco/$file; fi; done
./gradlew jacocoTestReport --no-daemon --stacktrace
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run Sonar
if: ${{ !cancelled() }}
run: |
touch ./build/reports/sonarProperties.txt
./gradlew sonar -D"sonar.scanner.dumpToFile"="./build/reports/sonarProperties.txt" --no-daemon --stacktrace
./gradlew sonar --no-daemon --stacktrace
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Upload Reports
if: ${{ !cancelled() }}
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: SonarStageReports
path: ./build/reports
manual-maintenance-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: "Check if manual maintenance was executed recently"
run: git log --since $(date -d "- 35 days" "+%x") | grep -ie "manual.maintenance" || ( echo "Last Manual Maintenance is too old. Do it now!"; exit 1)
merge-artefacts:
runs-on: ubuntu-latest
needs:
- sonar
- e2e-tests
- gradle-based-tests
- frontend-component-tests
- framework-toolbox-integration-tests
- framework-toolbox-consistency-tests
if: ${{ success() }}
steps:
- name: Merge Parameters Artifacts
uses: actions/upload-artifact/merge@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: parameters
pattern: parameters-*
delete-merged: true
- name: Merge Docker Logs Artifacts
uses: actions/upload-artifact/merge@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
if: always()
with:
name: dockerLogs
pattern: dockerLogs-*
delete-merged: true
- name: Merge Jacoco E2E Test Artifacts
uses: actions/upload-artifact/merge@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
if: always()
with:
name: JaCoCoResultsE2ETest
pattern: JaCoCoResultsE2ETest-*
delete-merged: true
- name: Merge Jacoco Framework Toolbox Test Artifacts
uses: actions/upload-artifact/merge@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
if: always()
with:
name: JaCoCoResultsToolbox
pattern: JaCoCoResultsToolbox-*
delete-merged: true
- name: Merge lcovResults Test Artifacts
uses: actions/upload-artifact/merge@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
if: always()
with:
name: lcovResults
pattern: lcovResults-*
delete-merged: true
- name: Merge E2E Test Artifacts
uses: actions/upload-artifact/merge@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
if: always()
with:
name: e2eTestReports
pattern: e2eTestReports-*
delete-merged: true
- name: Merge E2E DB dump Artifacts
uses: actions/upload-artifact/merge@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
if: always()
with:
name: e2eTestDatabaseDumps
pattern: e2eTestDatabaseDumps-*
delete-merged: true
- name: Merge Jacoco Unit Test Artifacts
uses: actions/upload-artifact/merge@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
if: always()
with:
name: JaCoCoResultsUnitTests
pattern: JaCoCoResultsUnitTests-*
delete-merged: true
- name: Merge Docker Image Artifacts
uses: actions/upload-artifact/merge@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
if: always()
with:
name: dockerImageVersions
pattern: dockerImageVersions-*
delete-merged: true
summary:
runs-on: ubuntu-latest
if: success()
needs:
- merge-artefacts
- manual-maintenance-check
steps:
- name: Summary of this workflow's overall outcome
run: exit 0