diff options
| author | Albin <albin@mullvad.net> | 2024-01-08 18:45:36 +0100 |
|---|---|---|
| committer | Albin <albin@mullvad.net> | 2024-01-08 19:51:38 +0100 |
| commit | 7b5396e9952ec8f4b5e5c242206fb3022be84d79 (patch) | |
| tree | c028ce9612f95c89528203ebeadb6b19935eeae9 | |
| parent | e7f11f1609b86d588a094b537af833a7ba5b5929 (diff) | |
| download | mullvadvpn-7b5396e9952ec8f4b5e5c242206fb3022be84d79.tar.xz mullvadvpn-7b5396e9952ec8f4b5e5c242206fb3022be84d79.zip | |
Run e2e tests nightly in GH actions
Apart from running on a schedule, it's also possible
to trigger the e2e tests using a manual dispatch.
| -rw-r--r-- | .github/workflows/android-app.yml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/.github/workflows/android-app.yml b/.github/workflows/android-app.yml index 77e7266bfd..97040b1cf5 100644 --- a/.github/workflows/android-app.yml +++ b/.github/workflows/android-app.yml @@ -30,6 +30,10 @@ on: description: Override container image type: string required: false + run_e2e_tests: + description: Run e2e tests + type: boolean + required: false run_firebase_tests: description: Run firebase tests type: boolean @@ -259,6 +263,15 @@ jobs: build-root-directory: android execution-only-caches: true + - name: Assemble instrumented test apk (e2e) + uses: burrunan/gradle-cache-action@v1 + with: + job-id: jdk17 + arguments: :test:e2e:assemble + gradle-version: wrapper + build-root-directory: android + execution-only-caches: true + - name: Upload apks uses: actions/upload-artifact@v3 with: @@ -266,6 +279,7 @@ jobs: path: | android/app/build/outputs/apk android/test/mockapi/build/outputs/apk + android/test/e2e/build/outputs/apk if-no-files-found: error retention-days: 1 @@ -303,6 +317,30 @@ jobs: if-no-files-found: ignore retention-days: 1 + instrumented-e2e-tests: + name: Run instrumented e2e tests + runs-on: [self-hosted, android-emulator] + if: github.event_name == 'schedule' || github.event.inputs.run_e2e_tests == 'true' + timeout-minutes: 30 + needs: [build-app] + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - uses: actions/download-artifact@v3 + with: + name: apks + path: android + + - name: Run instrumented test script + shell: bash -ieo pipefail {0} + env: + AUTO_FETCH_TEST_HELPER_APKS: true + VALID_TEST_ACCOUNT_TOKEN: ${{ secrets.ANDROID_PROD_TEST_ACCOUNT }} + INVALID_TEST_ACCOUNT_TOKEN: '0000000000000000' + run: | + ./android/scripts/run-instrumented-tests.sh e2e + instrumented-firebase-tests: name: Run instrumented firebase tests if: github.event_name == 'schedule' || github.event.inputs.run_firebase_tests == 'true' |
