-
Notifications
You must be signed in to change notification settings - Fork 356
88 lines (86 loc) · 2.58 KB
/
Android-CI.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
name: PullRequest
on: [ pull_request ]
jobs:
buildTest:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ macOS-13 ]
java_version: [ 17 ]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install JDK ${{ matrix.java_version }}
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: ${{ matrix.java_version }}
- uses: gradle/wrapper-validation-action@v3
- name: Install Android SDK
uses: hannesa2/action-android/[email protected]
- name: Run tests
run: ./gradlew test
env:
VERSION: ${{ github.ref }}
- name: Run instrumentation tests
uses: hannesa2/action-android/[email protected]
env:
VERSION: ${{ github.ref }}
with:
cmd: ./gradlew cAT --continue
api: 28
tag: default
abi: x86
cmdOptions: -noaudio -no-boot-anim -no-window -metrics-collection
- name: Archive Espresso results
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: IOIO-Espresso-report
path: applications/**/build/reports/androidTests/connected/
- name: Save logcat output
uses: actions/upload-artifact@v4
if: failure()
with:
name: IOIO-logcat
path: artifacts/logcat.log
- name: Archive screenshots
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: IOIO-Screenshots
path: |
applications/**/build/outputs/connected_android_test_additional_output/debugAndroidTest/connected
applications/**/build/outputs/androidTest-results/connected
Check:
name: Check
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
java_version: [ 17 ]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: ${{ matrix.java_version }}
- name: Install Android SDK
uses: hannesa2/action-android/[email protected]
- name: Code checks
run: ./gradlew check
- name: Archive Lint report
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: IOIO-Lint-report
path: applications/**/build/reports/lint-results.html