-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (100 loc) · 3.34 KB
/
develop.yml
File metadata and controls
103 lines (100 loc) · 3.34 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Develop
on:
push:
branches:
- 'develop'
pull_request:
branches:
- 'develop'
env:
MIN_COVERAGE_OVERALL: 4
MIN_COVERAGE_CHANGED: 0
jobs:
check:
runs-on: self-hosted
steps:
# --------------------------------------
# Install
# --------------------------------------
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 21
- uses: android-actions/setup-android@v3
with:
packages: 'ndk;29.0.14206865'
- uses: gradle/actions/setup-gradle@v5
# --------------------------------------
# Run
# --------------------------------------
- uses: actions/checkout@v6
- run: ./gradlew lintDebug testDebugUnitTest :app:koverHtmlReportDebug :app:koverXmlReportDebug :app:assembleDebug :app:bundleDebug
- run: ./gradlew testDeviceDebugAndroidTest '-Dorg.gradle.jvmargs=-Xmx6g -Dfile.encoding=UTF-8' '-Pandroid.testoptions.manageddevices.emulator.gpu=swiftshader_indirect'
# --------------------------------------
# Analyze
# --------------------------------------
- uses: actions/upload-artifact@v6
if: always()
with:
name: Lint
path: "**/build/reports/lint-results*.html"
if-no-files-found: error
# --------------------------------------
# Test
# --------------------------------------
- uses: actions/upload-artifact@v6
if: always()
with:
name: Unit Test
path: "**/build/reports/tests/"
if-no-files-found: error
- uses: dorny/test-reporter@v2
if: always()
with:
name: Unit Test Report
path: "**/build/test-results/test*/TEST-*.xml"
reporter: java-junit
# --------------------------------------
- uses: actions/upload-artifact@v6
if: always()
with:
name: Android Test
path: "**/build/reports/androidTests/"
if-no-files-found: error
- uses: dorny/test-reporter@v2
if: always()
with:
name: Android Test Report
path: "**/build/outputs/androidTest-results/**/TEST-*.xml"
reporter: java-junit
# --------------------------------------
- uses: actions/upload-artifact@v6
if: always()
with:
name: Coverage
path: "**/build/reports/kover/html*/"
if-no-files-found: error
- uses: mi-kas/kover-report@v1
if: github.event_name == 'pull_request'
with:
path: ${{ github.workspace }}/app/build/reports/kover/reportDebug.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: ${{ env.MIN_COVERAGE_OVERALL }}
min-coverage-changed-files: ${{ env.MIN_COVERAGE_CHANGED }}
coverage-counter-type: INSTRUCTION
# --------------------------------------
# Build
# --------------------------------------
- uses: actions/upload-artifact@v6
if: success()
with:
name: Assemble
path: "app/build/outputs/apk/debug/*.apk"
if-no-files-found: error
# --------------------------------------
- uses: actions/upload-artifact@v6
if: success()
with:
name: Bundle
path: "app/build/outputs/bundle/debug/*.aab"
if-no-files-found: error