-
Notifications
You must be signed in to change notification settings - Fork 2
109 lines (106 loc) · 3.23 KB
/
Android-CI-Espresso.yml
File metadata and controls
109 lines (106 loc) · 3.23 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# https://github.com/uber/AutoDispose/blob/master/.github/workflows/ci.yml
name: Build and Test
on:
push:
branches:
- master
pull_request:
jobs:
BuildTest:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04 ]
api: [ 34 ]
abi: [ x86_64 ]
tag: [ 'default' ]
java_version: [ 17 ]
# include:
# - java_version: 17
# os: macOS-14
# api: 31
# abi: arm64-v8a
# tag: 'google_apis'
steps:
- name: Show architecture
run: uname -a
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: true
- name: Install JDK ${{ matrix.java_version }}
uses: actions/setup-java@v5
with:
distribution: 'adopt'
java-version: ${{ matrix.java_version }}
- name: kvm support
run: |
egrep -c '(vmx|svm)' /proc/cpuinfo
id
sudo adduser $USER kvm
sudo chown -R $USER /dev/kvm
id
- name: prepare
run: |
sudo apt-get update && sudo apt-get install -y exiftool imagemagick xdg-utils libimage-exiftool-perl zsh jq xorg
# brew install exiftool imagemagick
- uses: gradle/actions/wrapper-validation@v6
- name: Install Android SDK
uses: hannesa2/action-android/install-sdk@0.1.16.7
- name: Decrypt keystore
run: ./signing/decrypt.sh
env:
CRYPT_PASS: ${{ secrets.CRYPT_PASS }}
- name: Run instrumentation tests
uses: hannesa2/action-android/emulator-run-cmd@0.1.16.7
with:
cmd: ./gradlew cAT --continue
api: ${{ matrix.api }}
tag: ${{ matrix.tag }}
abi: ${{ matrix.abi }}
cmdOptions: -noaudio -no-boot-anim -no-window -metrics-collection
bootTimeout: 720 # seconds = 12 minutes
- name: Archive Espresso results
uses: actions/upload-artifact@v7
if: ${{ always() }}
with:
name: Logcat-Espresso-report
path: app/build/reports/androidTests/connected
- name: Archive screenshots
if: ${{ always() }}
uses: actions/upload-artifact@v7
with:
name: Logcat-Screenshots
path: |
app/build/outputs/connected_android_test_additional_output/debugAndroidTest/connected
app/build/outputs/androidTest-results/connected
- name: cleanup
run: ./signing/cleanup.sh
Check:
name: Check
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
java_version: [ 17 ]
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: true
- name: Install JDK ${{ matrix.java_version }}
uses: actions/setup-java@v5
with:
distribution: 'adopt'
java-version: ${{ matrix.java_version }}
- name: gradle check
run: ./gradlew check
- name: Archive Lint report
uses: actions/upload-artifact@v7
if: ${{ always() }}
with:
name: Logcat-Lint-report
path: ./**/build/reports/lint-results*.html