-
Notifications
You must be signed in to change notification settings - Fork 1.3k
54 lines (53 loc) · 1.63 KB
/
test-avd.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
50
51
52
53
54
name: AVD测试
on:
workflow_call:
inputs:
api-level:
required: true
type: number
arch:
required: true
type: string
jobs:
build-and-test-on-macos:
runs-on: macos-latest
env:
DISABLE_TENCENT_MAVEN_MIRROR: true
steps:
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- name: checkout
uses: actions/checkout@v2
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- 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: revert gradle wrapper mirror setting
run: echo 'distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip' > gradle/wrapper/gradle-wrapper.properties
- name: buildSdk
run: ./gradlew buildSdk -S
- name: build sample/source
run: ./gradlew build
- name: unit test
run: ./gradlew jvmTestSdk -S
- name: run androidTestSdk
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ inputs.api-level }}
sdcard-path-or-size: 100M
emulator-build: 8420304
target: default
arch: ${{ inputs.arch }}
profile: pixel_2
script: ./gradlew androidTestSdk
- name: stop gradle deamon for actions/cache
run: ./gradlew --stop