-
Notifications
You must be signed in to change notification settings - Fork 9
56 lines (47 loc) · 1.5 KB
/
android-workflow.yaml
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
name: Covid19 Tracker CI Workflow
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
jobs:
test:
name: Build and run tests
runs-on: macos-latest
strategy:
fail-fast: false
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Detekt
run: ./gradlew detekt
- name: Run unit tests
run: ./gradlew testDebugUnitTest --stacktrace
- name: Run instrumentation tests (only @MediumTest)
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
arch: x86
profile: Nexus 6
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none
script: ./gradlew connectedAndroidTest --stacktrace -Pandroid.testInstrumentationRunnerArguments.size=medium
- name: Upload reports
uses: actions/upload-artifact@v1
with:
name: Covid19 Tracker - Tests reports
path: app/build/reports
- name: Generate apk
run: ./gradlew assembleDebug --stacktrace
- name: Upload apk
uses: actions/upload-artifact@v1
with:
name: Covid19 Tracker - Apk debug
path: app/build/outputs/apk/debug/covid19tracker-debug.apk