9
9
name : Desktop - End-to-end tests
10
10
on :
11
11
schedule :
12
- - cron : ' 0 0 * * *'
12
+ - cron : " 0 0 * * *"
13
13
workflow_dispatch :
14
14
inputs :
15
15
oses :
16
- description : " Space-delimited list of targets to run tests on, e.g. `debian12 ubuntu2004`. \
16
+ description :
17
+ " Space-delimited list of targets to run tests on, e.g. `debian12 ubuntu2004`. \
17
18
Available images:\n
18
19
`debian11 debian12 ubuntu2004 ubuntu2204 ubuntu2404 ubuntu2410 fedora39 \
19
20
fedora40 fedora41 windows10 windows11 macos12 macos13 macos14 macos15`.\n
20
21
Default images:\n
21
22
`debian12 ubuntu2004 ubuntu2204 ubuntu2404 ubuntu2410 fedora39 \
22
23
fedora40 fedora41 windows10 windows11 macos13 macos14 macos15`."
23
- default : ' '
24
+ default : " "
24
25
required : false
25
26
type : string
26
27
tests :
27
28
description : " Tests to run (defaults to all if empty)"
28
- default : ' '
29
+ default : " "
29
30
required : false
30
31
type : string
31
32
95
96
uses : actions/checkout@v4
96
97
- name : Use custom container image if specified
97
98
if : ${{ github.event.inputs.override_container_image != '' }}
98
- run : echo "inner_container_image=${{ github.event.inputs.override_container_image }}"
99
+ run :
100
+ echo "inner_container_image=${{ github.event.inputs.override_container_image }}"
99
101
>> $GITHUB_ENV
100
102
- name : Use default container image and resolve digest
101
103
if : ${{ github.event.inputs.override_container_image == '' }}
@@ -145,7 +147,7 @@ jobs:
145
147
run : ./desktop/packages/mullvad-vpn/scripts/build-test-executable.sh
146
148
- name : Upload app
147
149
uses : actions/upload-artifact@v4
148
- if : ' !cancelled()'
150
+ if : " !cancelled()"
149
151
with :
150
152
name : linux-build
151
153
path : |
@@ -160,9 +162,7 @@ jobs:
160
162
container :
161
163
image : ${{ needs.prepare-linux.outputs.container_image }}
162
164
if : |
163
- !cancelled() &&
164
- needs.prepare-matrices.outputs.linux_matrix != '[]' &&
165
- needs.prepare-matrices.outputs.linux_matrix != ''
165
+ !cancelled()
166
166
steps :
167
167
# Fix for HOME path overridden by GH runners when building in containers, see:
168
168
# https://github.com/actions/runner/issues/863
@@ -196,7 +196,7 @@ jobs:
196
196
- name : Build test-manager
197
197
run : ./test/scripts/container-run.sh cargo build --package test-manager --release
198
198
- uses : actions/upload-artifact@v4
199
- if : ' !cancelled()'
199
+ if : " !cancelled()"
200
200
with :
201
201
name : linux-test-manager-build
202
202
path : |
@@ -228,7 +228,7 @@ jobs:
228
228
"$CARGO_TARGET_DIR/x86_64-unknown-linux-gnu/release/test-runner" \
229
229
"$CARGO_TARGET_DIR/x86_64-unknown-linux-gnu/release/connection-checker"
230
230
- uses : actions/upload-artifact@v4
231
- if : ' !cancelled()'
231
+ if : " !cancelled()"
232
232
with :
233
233
name : linux-test-runner-binaries
234
234
path : bin/*
@@ -247,6 +247,7 @@ jobs:
247
247
]
248
248
if : |
249
249
!cancelled() &&
250
+ needs.get-app-version.result == 'success' &&
250
251
needs.prepare-matrices.outputs.linux_matrix != '[]' &&
251
252
needs.prepare-matrices.outputs.linux_matrix != ''
252
253
runs-on : [self-hosted, desktop-test, Linux] # app-test-linux
@@ -299,7 +300,7 @@ jobs:
299
300
./test/scripts/run/ci.sh ${{ matrix.os }}
300
301
- name : Upload test report
301
302
uses : actions/upload-artifact@v4
302
- if : ' !cancelled()'
303
+ if : " !cancelled()"
303
304
with :
304
305
name : ${{ matrix.os }}_report
305
306
path : ./test/.ci-logs/${{ matrix.os }}_report
@@ -325,7 +326,7 @@ jobs:
325
326
- uses : actions/setup-node@v4
326
327
with :
327
328
node-version-file : desktop/package.json
328
- cache : ' npm'
329
+ cache : " npm"
329
330
cache-dependency-path : desktop/package-lock.json
330
331
- name : Install Rust
331
332
run : rustup target add i686-pc-windows-msvc
@@ -353,7 +354,7 @@ jobs:
353
354
shell : bash
354
355
run : ./desktop/packages/mullvad-vpn/scripts/build-test-executable.sh
355
356
- uses : actions/upload-artifact@v4
356
- if : ' !cancelled()'
357
+ if : " !cancelled()"
357
358
with :
358
359
name : windows-build
359
360
path : .\dist\*.exe
@@ -362,6 +363,7 @@ jobs:
362
363
needs : [prepare-matrices, build-windows, get-app-version]
363
364
if : |
364
365
!cancelled() &&
366
+ needs.get-app-version.result == 'success' &&
365
367
needs.prepare-matrices.outputs.windows_matrix != '[]' &&
366
368
needs.prepare-matrices.outputs.windows_matrix != ''
367
369
name : Windows end-to-end tests
@@ -389,7 +391,7 @@ jobs:
389
391
./test/scripts/run/ci.sh ${{ matrix.os }}
390
392
- name : Upload test report
391
393
uses : actions/upload-artifact@v4
392
- if : ' !cancelled()'
394
+ if : " !cancelled()"
393
395
with :
394
396
name : ${{ matrix.os }}_report
395
397
path : ./test/.ci-logs/${{ matrix.os }}_report
@@ -419,14 +421,14 @@ jobs:
419
421
- uses : actions/setup-node@v4
420
422
with :
421
423
node-version-file : desktop/package.json
422
- cache : ' npm'
424
+ cache : " npm"
423
425
cache-dependency-path : desktop/package-lock.json
424
426
- name : Build app
425
427
run : ./build.sh
426
428
- name : Build test executable
427
429
run : ./desktop/packages/mullvad-vpn/scripts/build-test-executable.sh
428
430
- uses : actions/upload-artifact@v4
429
- if : ' !cancelled()'
431
+ if : " !cancelled()"
430
432
with :
431
433
name : macos-build
432
434
path : |
@@ -437,6 +439,7 @@ jobs:
437
439
needs : [prepare-matrices, build-macos, get-app-version]
438
440
if : |
439
441
!cancelled() &&
442
+ needs.get-app-version.result == 'success' &&
440
443
needs.prepare-matrices.outputs.macos_matrix != '[]' &&
441
444
needs.prepare-matrices.outputs.macos_matrix != ''
442
445
name : macOS end-to-end tests
@@ -464,23 +467,23 @@ jobs:
464
467
./test/scripts/run/ci.sh ${{ matrix.os }}
465
468
- name : Upload test report
466
469
uses : actions/upload-artifact@v4
467
- if : ' !cancelled()'
470
+ if : " !cancelled()"
468
471
with :
469
472
name : ${{ matrix.os }}_report
470
473
path : ./test/.ci-logs/${{ matrix.os }}_report
471
474
472
475
compile-test-matrix :
473
476
name : Result matrix
474
477
needs : [e2e-test-linux, e2e-test-windows, e2e-test-macos]
475
- if : ' !cancelled()'
478
+ if : " !cancelled()"
476
479
runs-on : ubuntu-latest
477
480
container :
478
481
image : ${{ needs.prepare-linux.outputs.container_image }}
479
482
steps :
480
483
- name : Download test report
481
484
uses : actions/download-artifact@v4
482
485
with :
483
- pattern : ' *_report'
486
+ pattern : " *_report"
484
487
merge-multiple : true
485
488
- name : Create binaries directory
486
489
shell : bash -ieo pipefail {0}
0 commit comments