-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (47 loc) · 1.38 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Test SDKs
on:
push:
branches:
- main
pull_request:
paths:
- '**/*'
jobs:
test-android-sdk:
runs-on: macos-latest
env:
ANDROID_API_LEVEL: 33
steps:
- name: Check out Java SDK
uses: actions/checkout@v3
with:
repository: 'Eppo-exp/android-sdk'
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: 'Set up GCP SDK'
uses: 'google-github-actions/setup-gcloud@v0'
- name: Restore gradle.properties
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} #TODO: populate
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} #TODO: populate
shell: bash
run: |
mkdir -p ~/.gradle/
echo "GRADLE_USER_HOME=${HOME}/.gradle" >> $GITHUB_ENV
echo "MAVEN_USERNAME=${MAVEN_USERNAME}" > ~/.gradle/gradle.properties
echo "MAVEN_PASSWORD=${MAVEN_PASSWORD}" >> ~/.gradle/gradle.properties
- name: Set up test data
run: make test-data
- name: Spin up emulator
uses: ReactiveCircus/android-emulator-runner@v2
with:
api-level: 33
target: google_apis
arch: x86_64
script: |
echo "Emulator started"
adb reverse tcp:4001 tcp:4001
./gradlew connectedCheck