-
Notifications
You must be signed in to change notification settings - Fork 81
69 lines (60 loc) · 1.86 KB
/
github_actions.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
name: Tests
on:
pull_request:
branches:
- 'dev'
paths-ignore:
- '**.md'
push:
branches:
- 'dev'
paths-ignore:
- '**.md'
jobs:
tests:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Run style check
run: ./gradlew ktlintCheck
- name: Run tests
run: ./gradlew testDebugUnitTest --stacktrace
android_tests:
runs-on: macos-latest
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
api-level: [19, 28, 29]
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: google_apis
arch: x86
disable-animations: true
script: ./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.notAnnotation=com.example.util.simpletimetracker.utils.Widget --stacktrace
# For some reason widget tests make other tests to fail, so run them separately.
- name: Run widget tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: google_apis
arch: x86
disable-animations: true
script: ./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.example.util.simpletimetracker.utils.Widget --stacktrace
- name: Upload tests results
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: android_tests_results
path: app/build/reports/androidTests/connected