diff options
| author | Markus Pettersson <markus.pettersson@mullvad.net> | 2025-03-05 12:54:28 +0100 |
|---|---|---|
| committer | Markus Pettersson <markus.pettersson@mullvad.net> | 2025-03-05 12:54:28 +0100 |
| commit | ec359a9b014e2e9c82bc3cff32378647bd92f8d6 (patch) | |
| tree | bbc521444e2cd3f5a0932183c902775ce91c230a | |
| parent | d507647cef581a84d06e39ead801be78a3f9120e (diff) | |
| parent | 8f61a6fad2488858df6f86ac8e8b5a61eed5af1e (diff) | |
| download | mullvadvpn-ec359a9b014e2e9c82bc3cff32378647bd92f8d6.tar.xz mullvadvpn-ec359a9b014e2e9c82bc3cff32378647bd92f8d6.zip | |
Merge branch 'fix-desktop-e2e-workflow'
| -rw-r--r-- | .github/workflows/desktop-e2e.yml | 31 | ||||
| -rwxr-xr-x | test/scripts/build/runner-image.sh | 4 | ||||
| -rwxr-xr-x | test/scripts/utils/lib.sh | 4 | ||||
| -rwxr-xr-x | test/test-by-version.sh | 3 |
4 files changed, 25 insertions, 17 deletions
diff --git a/.github/workflows/desktop-e2e.yml b/.github/workflows/desktop-e2e.yml index 274107a29b..756d178c77 100644 --- a/.github/workflows/desktop-e2e.yml +++ b/.github/workflows/desktop-e2e.yml @@ -89,9 +89,6 @@ jobs: prepare-linux: name: Prepare Linux build container needs: prepare-matrices - if: | - needs.prepare-matrices.outputs.linux_matrix != '[]' && - !startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - name: Checkout repository @@ -113,6 +110,10 @@ jobs: runs-on: ubuntu-latest container: image: ${{ needs.prepare-linux.outputs.container_image }} + if: | + !cancelled() && + needs.prepare-matrices.outputs.linux_matrix != '[]' && + needs.prepare-matrices.outputs.linux_matrix != '' continue-on-error: true steps: # Fix for HOME path overridden by GH runners when building in containers, see: @@ -158,6 +159,10 @@ jobs: runs-on: ubuntu-latest container: image: ${{ needs.prepare-linux.outputs.container_image }} + if: | + !cancelled() && + needs.prepare-matrices.outputs.linux_matrix != '[]' && + needs.prepare-matrices.outputs.linux_matrix != '' steps: # Fix for HOME path overridden by GH runners when building in containers, see: # https://github.com/actions/runner/issues/863 @@ -184,6 +189,10 @@ jobs: needs: prepare-linux # Note: libssl-dev is installed on the test server, so build test-manager there for the sake of simplicity runs-on: [self-hosted, desktop-test, Linux] # app-test-linux + if: | + !cancelled() && + needs.prepare-matrices.outputs.linux_matrix != '[]' && + needs.prepare-matrices.outputs.linux_matrix != '' steps: - name: Checkout repository uses: actions/checkout@v4 @@ -207,6 +216,10 @@ jobs: runs-on: ubuntu-latest container: image: ${{ needs.prepare-linux.outputs.container_image }} + if: | + !cancelled() && + needs.prepare-matrices.outputs.linux_matrix != '[]' && + needs.prepare-matrices.outputs.linux_matrix != '' steps: - name: Checkout repository uses: actions/checkout@v4 @@ -256,7 +269,6 @@ jobs: path: ${{ github.workspace }}/bin - name: Download mullvad-version uses: actions/download-artifact@v4 - if: ${{ needs.build-test-manager-linux.result == 'success' }} with: name: mullvad-version-linux path: ${{ github.workspace }}/bin @@ -270,10 +282,6 @@ jobs: run: | chmod +x ${{ github.workspace }}/bin/* shell: bash - - name: Check binaries - run: | - ls -la ${{ github.workspace }}/bin - shell: bash - name: Download App uses: actions/download-artifact@v4 if: ${{ needs.build-linux-app.result == 'success' }} @@ -379,7 +387,7 @@ jobs: run: | git fetch --tags --prune-tags --force export TEST_FILTERS="${{ github.event.inputs.tests }}" - ./test/scripts/ci-runtests.sh ${{ matrix.os }} + ./test/scripts/run/ci.sh ${{ matrix.os }} - name: Upload test report uses: actions/upload-artifact@v4 if: '!cancelled()' @@ -453,7 +461,7 @@ jobs: run: | git fetch --tags --prune-tags --force export TEST_FILTERS="${{ github.event.inputs.tests }}" - ./test/scripts/ci-runtests.sh ${{ matrix.os }} + ./test/scripts/run/ci.sh ${{ matrix.os }} - name: Upload test report uses: actions/upload-artifact@v4 if: '!cancelled()' @@ -486,9 +494,6 @@ jobs: - name: chmod binaries run: | chmod +x ${{ github.workspace }}/bin/* - - name: Check binaries - run: | - ls -la ${{ github.workspace }}/bin shell: bash - name: Generate test result matrix shell: bash -ieo pipefail {0} diff --git a/test/scripts/build/runner-image.sh b/test/scripts/build/runner-image.sh index 47c41b2e38..bb0b37755e 100755 --- a/test/scripts/build/runner-image.sh +++ b/test/scripts/build/runner-image.sh @@ -23,8 +23,8 @@ echo "************************************************************" echo "* Preparing test runner image: $TARGET" echo "************************************************************" -mkdir -p "${TEST_FRAMEWORK_REPO}/testrunner-images" -TEST_RUNNER_IMAGE_PATH="${TEST_FRAMEWORK_REPO}/testrunner-images/${TEST_RUNNER_IMAGE_FILENAME}" +mkdir -p "${TEST_FRAMEWORK_ROOT}/testrunner-images" +TEST_RUNNER_IMAGE_PATH="${TEST_FRAMEWORK_ROOT}/testrunner-images/${TEST_RUNNER_IMAGE_FILENAME}" case $TARGET in diff --git a/test/scripts/utils/lib.sh b/test/scripts/utils/lib.sh index dd1630dc33..55b98f89cb 100755 --- a/test/scripts/utils/lib.sh +++ b/test/scripts/utils/lib.sh @@ -230,8 +230,8 @@ function run_tests_for_os { test_manager="${TEST_DIST_DIR%/}/test-manager" runner_dir_flag=("--runner-dir" "$TEST_DIST_DIR") else - # Assume test-manager is in path. - test_manager="$(which test-manager)" + # Build & run test-manager + test_manager="cargo run --bin test-manager" runner_dir_flag=() fi diff --git a/test/test-by-version.sh b/test/test-by-version.sh index 3b97d45461..7ce6ff9a7e 100755 --- a/test/test-by-version.sh +++ b/test/test-by-version.sh @@ -59,6 +59,9 @@ echo "**********************************" echo "* Downloading app packages" echo "**********************************" +# shellcheck source=test/scripts/utils/download.sh +source "scripts/utils/download.sh" + download_app_package "$APP_VERSION" "$TEST_OS" download_e2e_executable "$APP_VERSION" "$TEST_OS" |
