-
Notifications
You must be signed in to change notification settings - Fork 3
63 lines (58 loc) · 2 KB
/
android.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
# credit: https://habr.com/ru/post/488134/
name: Android CI
on:
push:
branches:
- master
- dev
pull_request:
workflow_dispatch:
jobs:
build-and-test: # instrumental tests run on MacOS to enable hardware acceleration
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: grant permissions to gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew assembleDebug
- name: Run unit tests
run: ./gradlew test
- name: Run instrumental tests
# warning: it depends on "grant permission to gradlew" step
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
script: ./gradlew connectedCheck
- name: Generate documentation
run: ./gradlew dokka
- name: Upload APK to artifacts
uses: actions/upload-artifact@v1
with:
name: learn-braille-debug
path: app/build/outputs/apk/debug/app-debug.apk
- name: Upload documentation to artifacts
uses: actions/upload-artifact@v1
with:
name: documentation-html
path: app/build/dokka/
- name: Upload artifact (test reports)
uses: actions/upload-artifact@v1
with:
name: test-reports
path: app/build/reports/
if: success() || failure()
static-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up detekt # detekt gradle plugin uses newer gradle version than is used
run: curl -sSLO https://github.com/detekt/detekt/releases/download/v1.12.0-RC1/detekt && chmod a+x detekt
- name: Static check with detekt
run: ./detekt -c detekt-config.yml --build-upon-default-config
- name: Check not using developer's course
run: grep UsersCourse app/src/main/java/com/github/braillesystems/learnbraille/LearnBrailleApplication.kt