diff options
| author | Albin <albin@mullvad.net> | 2025-01-23 22:52:12 +0100 |
|---|---|---|
| committer | Albin <albin@mullvad.net> | 2025-01-27 15:58:46 +0100 |
| commit | a928adaf65c71c11c8b9c7752dd16a74f98d2154 (patch) | |
| tree | f0481efec4ddc4f4c4561d18f21d6e1b2cef7229 | |
| parent | d5c39740d6a539db062c42c5f23de4a692264074 (diff) | |
| download | mullvadvpn-a928adaf65c71c11c8b9c7752dd16a74f98d2154.tar.xz mullvadvpn-a928adaf65c71c11c8b9c7752dd16a74f98d2154.zip | |
Run e2e tests towards stagemole by default
Co-authored-by: Niklas Berglund <niklas.berglund@gmail.com>
| -rw-r--r-- | .github/workflows/android-app.yml | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/.github/workflows/android-app.yml b/.github/workflows/android-app.yml index 14c7bc0e5a..862e2e507d 100644 --- a/.github/workflows/android-app.yml +++ b/.github/workflows/android-app.yml @@ -37,15 +37,22 @@ on: type: boolean required: false mockapi_test_repeat: - description: Mockapi test repeat(self hosted) + description: Mockapi test repeat (self hosted) default: '1' required: true type: string e2e_test_repeat: - description: e2e test repeat(self hosted) + description: e2e test repeat (self hosted) default: '0' required: true type: string + e2e_tests_infra_flavor: + description: > + Infra environment to run e2e tests on (prod/stagemole). + If set to 'stagemole' test-related artefacts will be uploaded. + default: 'stagemole' + required: true + type: string # Build if main is updated to ensure up-to-date caches are available push: branches: [main] @@ -338,7 +345,9 @@ jobs: - name: Build stagemole app uses: burrunan/gradle-cache-action@v1 - if: github.event.inputs.run_firebase_tests == 'true' + if: > + (github.event.inputs.e2e_test_repeat != '0' && github.event.inputs.e2e_tests_infra_flavor == 'stagemole') || + github.event.inputs.run_firebase_tests == 'true' with: job-id: jdk17 arguments: | @@ -530,7 +539,7 @@ jobs: - name: Calculate timeout id: calculate-timeout - run: echo "timeout=$(( ${{ matrix.test-repeat }} * 10 ))" >> $GITHUB_OUTPUT + run: echo "timeout=$(( ${{ matrix.test-repeat }} * 15 ))" >> $GITHUB_OUTPUT shell: bash - name: Run instrumented test script @@ -540,15 +549,27 @@ jobs: env: AUTO_FETCH_TEST_HELPER_APKS: true TEST_TYPE: e2e - BILLING_FLAVOR: oss - INFRA_FLAVOR: prod - VALID_TEST_ACCOUNT_NUMBER: ${{ secrets.ANDROID_PROD_TEST_ACCOUNT }} + BILLING_FLAVOR: ${{ github.event.inputs.e2e_tests_infra_flavor == 'prod' && 'oss' || 'play' }} + INFRA_FLAVOR: ${{ github.event.inputs.e2e_tests_infra_flavor }} + PARTNER_AUTH: |- + ${{ github.event.inputs.e2e_tests_infra_flavor == 'stagemole' && secrets.STAGEMOLE_PARTNER_AUTH || '' }} + VALID_TEST_ACCOUNT_NUMBER: |- + ${{ github.event.inputs.e2e_tests_infra_flavor == 'prod' && secrets.ANDROID_PROD_TEST_ACCOUNT || '' }} INVALID_TEST_ACCOUNT_NUMBER: '0000000000000000' ENABLE_HIGHLY_RATE_LIMITED_TESTS: ${{ github.event_name == 'schedule' && 'true' || 'false' }} ENABLE_ACCESS_TO_LOCAL_API_TESTS: true REPORT_DIR: ${{ steps.prepare-report-dir.outputs.report_dir }} run: ./android/scripts/run-instrumented-tests-repeat.sh ${{ matrix.test-repeat }} + - name: Upload e2e instrumentation report + uses: actions/upload-artifact@v4 + if: > + always() && matrix.test-repeat != 0 && + github.event.inputs.e2e_tests_infra_flavor == 'stagemole' + with: + name: e2e-instrumentation-report + path: ${{ steps.prepare-report-dir.outputs.report_dir }} + firebase-tests: name: Run firebase tests if: github.event.inputs.run_firebase_tests == 'true' |
