-
Notifications
You must be signed in to change notification settings - Fork 1
94 lines (92 loc) · 2.7 KB
/
pull-request.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: CI
on:
pull_request:
push:
branches:
- master
jobs:
Build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
api: [ 28 ]
abi: [ x86_64 ]
tag: [ 'default' ]
include:
# - api: 31
# abi: x86_64
# tag: 'google_apis'
- os: ubuntu-latest
api: 30
abi: x86_64
tag: 'google_apis'
steps:
- name: kvm support
run: |
egrep -c '(vmx|svm)' /proc/cpuinfo
id
sudo adduser $USER kvm
sudo chown -R $USER /dev/kvm
id
- name: Checkout
uses: actions/checkout@v3
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
- name: Install Android SDK
uses: hannesa2/action-android/[email protected]
- name: Build project
run: ./gradlew assemble
- name: Run instrumentation tests
uses: hannesa2/action-android/[email protected]
with:
cmd: ./gradlew cAT --continue
api: ${{ matrix.api }}
tag: ${{ matrix.tag }}
abi: ${{ matrix.abi }}
cmdOptions: -noaudio -no-boot-anim -no-window
- name: Archive Espresso results
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: Moka-Espresso-${{ matrix.api }}-${{ matrix.abi }}-report
path: sample/build/reports/androidTests/connected
- name: Archive screenshots
if: ${{ always() }}
uses: actions/[email protected]
with:
name: Moka-Screenshots-${{ matrix.api }}-${{ matrix.abi }}-report
path: |
sample/build/outputs/connected_android_test_additional_output/debugAndroidTest/connected
sample/build/outputs/androidTest-results/connected
Check:
name: Check
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install JDK ${{ matrix.java_version }}
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
- uses: gradle/[email protected]
- name: Install Android SDK
uses: hannesa2/action-android/[email protected]
- name: Build project
run: ./gradlew check
- name: Archive Lint report
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: Lint-report
path: sample/build/reports/lint-results*.html