android: run integration test in CI #1144
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Android CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- "*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: "go.mod" | |
- name: Switch to Java 17 # Note: 17 is pre-installed on ubuntu-latest | |
uses: actions/setup-java@v3 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
# Clean should essentially be a no-op, but make sure that it works. | |
- name: Clean | |
run: make clean | |
- name: Build APKs | |
run: make tailscale-debug.apk | |
- name: Run Unit Tests | |
run: ./gradlew 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: ./gradlew connectedAndroidTest |