summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2024-01-18 09:12:39 +0100
committerAlbin <albin@mullvad.net>2024-01-18 17:12:06 +0100
commit9157306570bdb1c11850d5e30222504f86f2ba79 (patch)
tree253c6af0397a20b46646cfab7f6ac6d9d563f208
parent86de8dea23bc49ce67212f2a160498ce640302d9 (diff)
downloadmullvadvpn-9157306570bdb1c11850d5e30222504f86f2ba79.tar.xz
mullvadvpn-9157306570bdb1c11850d5e30222504f86f2ba79.zip
Add firebase stagemole e2e tests action
-rw-r--r--.github/workflows/android-app.yml39
-rw-r--r--android/test/firebase/e2e-play-stagemole.yml11
-rw-r--r--android/test/firebase/mockapi-oss.yml (renamed from android/test/firebase-test-lab.yml)2
3 files changed, 45 insertions, 7 deletions
diff --git a/.github/workflows/android-app.yml b/.github/workflows/android-app.yml
index 70b5c3ca7d..8d55ebc5f2 100644
--- a/.github/workflows/android-app.yml
+++ b/.github/workflows/android-app.yml
@@ -204,7 +204,7 @@ jobs:
name: relay-list
path: build
- - name: Build Android app
+ - name: Build app
uses: burrunan/gradle-cache-action@v1
with:
job-id: jdk17
@@ -212,6 +212,15 @@ jobs:
gradle-version: wrapper
build-root-directory: android
+ - name: Build stagemole app
+ uses: burrunan/gradle-cache-action@v1
+ if: github.event_name == 'schedule' || github.event.inputs.run_firebase_tests == 'true'
+ with:
+ job-id: jdk17
+ arguments: assemblePlayStagemoleDebug
+ gradle-version: wrapper
+ build-root-directory: android
+
- name: Run unit tests
uses: burrunan/gradle-cache-action@v1
with:
@@ -306,8 +315,11 @@ jobs:
shell: bash -ieo pipefail {0}
env:
AUTO_FETCH_TEST_HELPER_APKS: true
+ TEST_TYPE: ${{ matrix.test-type }}
+ BILLING_FLAVOR: oss
+ INFRA_FLAVOR: prod
run: |
- ./android/scripts/run-instrumented-tests.sh ${{ matrix.test-type }}
+ ./android/scripts/run-instrumented-tests.sh
- name: Upload instrumentation report (${{ matrix.test-type }})
uses: actions/upload-artifact@v3
@@ -337,17 +349,30 @@ jobs:
shell: bash -ieo pipefail {0}
env:
AUTO_FETCH_TEST_HELPER_APKS: true
+ TEST_TYPE: e2e
+ BILLING_FLAVOR: oss
+ INFRA_FLAVOR: prod
VALID_TEST_ACCOUNT_TOKEN: ${{ secrets.ANDROID_PROD_TEST_ACCOUNT }}
INVALID_TEST_ACCOUNT_TOKEN: '0000000000000000'
run: |
- ./android/scripts/run-instrumented-tests.sh e2e
+ ./android/scripts/run-instrumented-tests.sh
- instrumented-firebase-tests:
- name: Run instrumented firebase tests
+ firebase-tests:
+ name: Run firebase tests
if: github.event_name == 'schedule' || github.event.inputs.run_firebase_tests == 'true'
runs-on: ubuntu-latest
timeout-minutes: 30
needs: [build-app]
+ env:
+ FIREBASE_ENVIRONMENT_VARIABLES: "\
+ clearPackageData=true,\
+ runnerBuilder=de.mannodermaus.junit5.AndroidJUnit5Builder,\
+ invalid_test_account_token=0000000000000000,\
+ partner_auth=${{ secrets.STAGEMOLE_PARTNER_AUTH }}"
+ strategy:
+ fail-fast: false
+ matrix:
+ arg-spec-file: [mockapi-oss.yml, e2e-play-stagemole.yml]
steps:
- name: Checkout repository
uses: actions/checkout@v3
@@ -362,4 +387,6 @@ jobs:
env:
SERVICE_ACCOUNT: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}
with:
- arg-spec: 'android/test/firebase-test-lab.yml:default'
+ arg-spec: |
+ android/test/firebase/${{ matrix.arg-spec-file }}:default
+ --environment-variables ${{ env.FIREBASE_ENVIRONMENT_VARIABLES }}
diff --git a/android/test/firebase/e2e-play-stagemole.yml b/android/test/firebase/e2e-play-stagemole.yml
new file mode 100644
index 0000000000..1fecfefe94
--- /dev/null
+++ b/android/test/firebase/e2e-play-stagemole.yml
@@ -0,0 +1,11 @@
+---
+default:
+ type: instrumentation
+ app: android/app/build/outputs/apk/playStagemole/debug/app-play-stagemole-debug.apk
+ test: android/test/e2e/build/outputs/apk/playStagemole/debug/e2e-play-stagemole-debug.apk
+ timeout: 10m
+ use-orchestrator: true
+ device:
+ - {model: shiba, version: 34, locale: en, orientation: portrait}
+ - {model: tangorpro, version: 33, locale: en, orientation: portrait}
+ - {model: felix, version: 33, locale: en, orientation: portrait}
diff --git a/android/test/firebase-test-lab.yml b/android/test/firebase/mockapi-oss.yml
index d84e64134b..a1245f1d4f 100644
--- a/android/test/firebase-test-lab.yml
+++ b/android/test/firebase/mockapi-oss.yml
@@ -2,7 +2,7 @@
default:
type: instrumentation
app: android/app/build/outputs/apk/ossProd/debug/app-oss-prod-debug.apk
- test: android/test/mockapi/build/outputs/apk/debug/mockapi-debug.apk
+ test: android/test/mockapi/build/outputs/apk/oss/debug/mockapi-oss-debug.apk
timeout: 10m
use-orchestrator: true
device: