psa-demo java version changes to 11 #5
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: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: ${{ runner.os }}-gradle | |
- name: Download dependencies | |
run: ./gradlew build --no-daemon | |
- name: Set up Android SDK | |
uses: android-actions/setup-android@v2 | |
with: | |
api-level: 30 | |
target: default | |
arch: x86 | |
emulator-build: system-images;android-30;google_apis;x86 | |
- name: Start emulator | |
run: | | |
sudo chmod +x $ANDROID_HOME/emulator/emulator | |
sudo chmod +x $ANDROID_HOME/platform-tools/adb | |
$ANDROID_HOME/emulator/emulator -avd test -no-snapshot-save -noaudio -no-boot-anim -gpu swiftshader_indirect -no-window & | |
adb wait-for-device | |
adb shell input keyevent 82 | |
- name: Run tests | |
run: ./gradlew connectedAndroidTest |