Skip to content

Commit 3a56e3a

Browse files
committed
fixup! Output app version directly from workflow
1 parent 4a7349c commit 3a56e3a

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

.github/workflows/desktop-e2e.yml

+23-20
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,24 @@
99
name: Desktop - End-to-end tests
1010
on:
1111
schedule:
12-
- cron: '0 0 * * *'
12+
- cron: "0 0 * * *"
1313
workflow_dispatch:
1414
inputs:
1515
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`. \
1718
Available images:\n
1819
`debian11 debian12 ubuntu2004 ubuntu2204 ubuntu2404 ubuntu2410 fedora39 \
1920
fedora40 fedora41 windows10 windows11 macos12 macos13 macos14 macos15`.\n
2021
Default images:\n
2122
`debian12 ubuntu2004 ubuntu2204 ubuntu2404 ubuntu2410 fedora39 \
2223
fedora40 fedora41 windows10 windows11 macos13 macos14 macos15`."
23-
default: ''
24+
default: ""
2425
required: false
2526
type: string
2627
tests:
2728
description: "Tests to run (defaults to all if empty)"
28-
default: ''
29+
default: ""
2930
required: false
3031
type: string
3132

@@ -95,7 +96,8 @@ jobs:
9596
uses: actions/checkout@v4
9697
- name: Use custom container image if specified
9798
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 }}"
99101
>> $GITHUB_ENV
100102
- name: Use default container image and resolve digest
101103
if: ${{ github.event.inputs.override_container_image == '' }}
@@ -145,7 +147,7 @@ jobs:
145147
run: ./desktop/packages/mullvad-vpn/scripts/build-test-executable.sh
146148
- name: Upload app
147149
uses: actions/upload-artifact@v4
148-
if: '!cancelled()'
150+
if: "!cancelled()"
149151
with:
150152
name: linux-build
151153
path: |
@@ -160,9 +162,7 @@ jobs:
160162
container:
161163
image: ${{ needs.prepare-linux.outputs.container_image }}
162164
if: |
163-
!cancelled() &&
164-
needs.prepare-matrices.outputs.linux_matrix != '[]' &&
165-
needs.prepare-matrices.outputs.linux_matrix != ''
165+
!cancelled()
166166
steps:
167167
# Fix for HOME path overridden by GH runners when building in containers, see:
168168
# https://github.com/actions/runner/issues/863
@@ -196,7 +196,7 @@ jobs:
196196
- name: Build test-manager
197197
run: ./test/scripts/container-run.sh cargo build --package test-manager --release
198198
- uses: actions/upload-artifact@v4
199-
if: '!cancelled()'
199+
if: "!cancelled()"
200200
with:
201201
name: linux-test-manager-build
202202
path: |
@@ -228,7 +228,7 @@ jobs:
228228
"$CARGO_TARGET_DIR/x86_64-unknown-linux-gnu/release/test-runner" \
229229
"$CARGO_TARGET_DIR/x86_64-unknown-linux-gnu/release/connection-checker"
230230
- uses: actions/upload-artifact@v4
231-
if: '!cancelled()'
231+
if: "!cancelled()"
232232
with:
233233
name: linux-test-runner-binaries
234234
path: bin/*
@@ -247,6 +247,7 @@ jobs:
247247
]
248248
if: |
249249
!cancelled() &&
250+
needs.get-app-version.result == 'success' &&
250251
needs.prepare-matrices.outputs.linux_matrix != '[]' &&
251252
needs.prepare-matrices.outputs.linux_matrix != ''
252253
runs-on: [self-hosted, desktop-test, Linux] # app-test-linux
@@ -299,7 +300,7 @@ jobs:
299300
./test/scripts/run/ci.sh ${{ matrix.os }}
300301
- name: Upload test report
301302
uses: actions/upload-artifact@v4
302-
if: '!cancelled()'
303+
if: "!cancelled()"
303304
with:
304305
name: ${{ matrix.os }}_report
305306
path: ./test/.ci-logs/${{ matrix.os }}_report
@@ -325,7 +326,7 @@ jobs:
325326
- uses: actions/setup-node@v4
326327
with:
327328
node-version-file: desktop/package.json
328-
cache: 'npm'
329+
cache: "npm"
329330
cache-dependency-path: desktop/package-lock.json
330331
- name: Install Rust
331332
run: rustup target add i686-pc-windows-msvc
@@ -353,7 +354,7 @@ jobs:
353354
shell: bash
354355
run: ./desktop/packages/mullvad-vpn/scripts/build-test-executable.sh
355356
- uses: actions/upload-artifact@v4
356-
if: '!cancelled()'
357+
if: "!cancelled()"
357358
with:
358359
name: windows-build
359360
path: .\dist\*.exe
@@ -362,6 +363,7 @@ jobs:
362363
needs: [prepare-matrices, build-windows, get-app-version]
363364
if: |
364365
!cancelled() &&
366+
needs.get-app-version.result == 'success' &&
365367
needs.prepare-matrices.outputs.windows_matrix != '[]' &&
366368
needs.prepare-matrices.outputs.windows_matrix != ''
367369
name: Windows end-to-end tests
@@ -389,7 +391,7 @@ jobs:
389391
./test/scripts/run/ci.sh ${{ matrix.os }}
390392
- name: Upload test report
391393
uses: actions/upload-artifact@v4
392-
if: '!cancelled()'
394+
if: "!cancelled()"
393395
with:
394396
name: ${{ matrix.os }}_report
395397
path: ./test/.ci-logs/${{ matrix.os }}_report
@@ -419,14 +421,14 @@ jobs:
419421
- uses: actions/setup-node@v4
420422
with:
421423
node-version-file: desktop/package.json
422-
cache: 'npm'
424+
cache: "npm"
423425
cache-dependency-path: desktop/package-lock.json
424426
- name: Build app
425427
run: ./build.sh
426428
- name: Build test executable
427429
run: ./desktop/packages/mullvad-vpn/scripts/build-test-executable.sh
428430
- uses: actions/upload-artifact@v4
429-
if: '!cancelled()'
431+
if: "!cancelled()"
430432
with:
431433
name: macos-build
432434
path: |
@@ -437,6 +439,7 @@ jobs:
437439
needs: [prepare-matrices, build-macos, get-app-version]
438440
if: |
439441
!cancelled() &&
442+
needs.get-app-version.result == 'success' &&
440443
needs.prepare-matrices.outputs.macos_matrix != '[]' &&
441444
needs.prepare-matrices.outputs.macos_matrix != ''
442445
name: macOS end-to-end tests
@@ -464,23 +467,23 @@ jobs:
464467
./test/scripts/run/ci.sh ${{ matrix.os }}
465468
- name: Upload test report
466469
uses: actions/upload-artifact@v4
467-
if: '!cancelled()'
470+
if: "!cancelled()"
468471
with:
469472
name: ${{ matrix.os }}_report
470473
path: ./test/.ci-logs/${{ matrix.os }}_report
471474

472475
compile-test-matrix:
473476
name: Result matrix
474477
needs: [e2e-test-linux, e2e-test-windows, e2e-test-macos]
475-
if: '!cancelled()'
478+
if: "!cancelled()"
476479
runs-on: ubuntu-latest
477480
container:
478481
image: ${{ needs.prepare-linux.outputs.container_image }}
479482
steps:
480483
- name: Download test report
481484
uses: actions/download-artifact@v4
482485
with:
483-
pattern: '*_report'
486+
pattern: "*_report"
484487
merge-multiple: true
485488
- name: Create binaries directory
486489
shell: bash -ieo pipefail {0}

0 commit comments

Comments
 (0)