From 2f9a72fbb72721f3d175e191ce4e0ca74dfcbbdd Mon Sep 17 00:00:00 2001 From: Markus Pettersson Date: Tue, 23 Jul 2024 10:10:48 +0200 Subject: [PATCH] Fix false negative in github action Add a precondition to all os-specific test steps in the desktop end-to-end test github action which checks if there are any vms to test for the given os. . Without this check, the parsing of the vm names assumed that there would exist atleast 1, causing the parsing to fail if there were none. This would show up in the GitHub summary view as a failure, while the intention was for it to be a noop. --- .github/workflows/desktop-e2e.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/desktop-e2e.yml b/.github/workflows/desktop-e2e.yml index fe084898f8ae..03e936830e34 100644 --- a/.github/workflows/desktop-e2e.yml +++ b/.github/workflows/desktop-e2e.yml @@ -126,7 +126,7 @@ jobs: e2e-test-linux: name: Linux end-to-end tests needs: [prepare-matrices, build-linux] - if: '!cancelled()' + if: !cancelled() && (needs.prepare-matrices.outputs.linux_matrix != '[]' && needs.prepare-matrices.outputs.linux_matrix != '') runs-on: [self-hosted, desktop-test, Linux] # app-test-linux timeout-minutes: 240 strategy: @@ -196,7 +196,7 @@ jobs: e2e-test-windows: needs: [prepare-matrices, build-windows] - if: '!cancelled()' + if: !cancelled() && (needs.prepare-matrices.outputs.windows_matrix != '[]' && needs.prepare-matrices.outputs.windows_matrix != '') name: Windows end-to-end tests runs-on: [self-hosted, desktop-test, Linux] # app-test-linux timeout-minutes: 240 @@ -263,7 +263,7 @@ jobs: e2e-test-macos: needs: [prepare-matrices, build-macos] - if: '!cancelled()' + if: !cancelled() && (needs.prepare-matrices.outputs.macos_matrix != '[]' && needs.prepare-matrices.outputs.macos_matrix != '') name: macOS end-to-end tests runs-on: [self-hosted, desktop-test, macOS] # app-test-macos-arm timeout-minutes: 240