-
-
Notifications
You must be signed in to change notification settings - Fork 402
65 lines (54 loc) · 1.78 KB
/
assemble-test-lint.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
name: Android CI
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
workflow_dispatch:
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Gradle Info
run: ./gradlew -version
- name: Assemble Debug Variant
run: ./gradlew assembleDebug
# Note: Currently no difference between flavors or debug and release
- name: Run Unit Tests
run: ./gradlew :app:testPureDebugUnitTest
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always() # also run if build step failed
with:
junit_files: app/build/test-results/**/*.xml
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
# To speed up lint check only run for release variant and only on app module
# Note: the app module has lintOptions.checkDependencies true, so submodules will be checked
# Source: https://groups.google.com/forum/#!topic/lint-dev/RGTvK_uHQGQ
- name: Lint Release Variants
run: ./gradlew :app:lintPureRelease :app:lintAmazonRelease
- uses: actions/upload-artifact@v3
if: ${{ always() }} # also upload of lint errors
with:
name: Lint reports
path: |
app/build/reports/lint-results-pureRelease.html
app/build/reports/lint-results-amazonRelease.html