From 7fae362ade4b0d9db8c503167917c0aa3699be83 Mon Sep 17 00:00:00 2001 From: kari-ts Date: Tue, 12 Nov 2024 10:46:02 -0800 Subject: [PATCH] android: run integration test in CI Fixes tailscale/corp#24242 Signed-off-by: kari-ts --- .github/workflows/android.yml | 14 +++++++++++++- Makefile | 4 ++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index f7ec8692d6..482f649e97 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -33,5 +33,17 @@ jobs: - name: Build APKs run: make tailscale-debug.apk - - name: Run tests + - name: Run Unit Tests run: make test + + - name: Set up Android SDK + uses: android-actions/setup-android@v3 + + - name: Start emulator + run: | + adb devices + adb wait-for-device + adb shell input keyevent 82 & + + - name: Run Integration Tests + run: make integration-test diff --git a/Makefile b/Makefile index b1f2c5d7ce..2146cf8a6c 100644 --- a/Makefile +++ b/Makefile @@ -247,6 +247,10 @@ checkandroidsdk: ## Check that Android SDK is installed test: gradle-dependencies ## Run the Android tests (cd android && ./gradlew test) +.PHONY: integration-test +integration-test: gradle-dependencies ## Run the integration tests + (cd android && ./gradlew connectedAndroidTest) + .PHONY: emulator emulator: ## Start an android emulator instance @echo "Checking installed SDK packages..."