-
Notifications
You must be signed in to change notification settings - Fork 22
117 lines (93 loc) · 3.56 KB
/
run_detekt_and_unit_tests.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
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Run Detekt and unit tests
on: push
jobs:
run_detekt_and_unit_tests:
name: Run Detekt and unit tests
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'
- name: Checkout source code
uses: actions/[email protected]
- name: Cache Gradle
uses: actions/cache@v2
with:
path: |
~/.gradle/caches/modules-*
~/.gradle/caches/jars-*
~/.gradle/caches/build-cache-*
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
# template-xml
- name: Run Detekt on template-xml
working-directory: ./deprecated/template-xml
run: ./gradlew detekt
- name: Archive Detekt reports on template-xml
uses: actions/upload-artifact@v2
with:
name: DetektReportsTemplateXML
path: deprecated/template-xml/build/reports/detekt/
- name: Run unit tests with Kover on template-xml
working-directory: ./deprecated/template-xml
run: ./gradlew koverHtmlReport
- name: Archive code coverage reports on template-xml
uses: actions/upload-artifact@v2
with:
name: CodeCoverageReportsTemplateXML
path: deprecated/template-xml/app/build/reports/kover/
# template-compose
- name: Run Detekt on template-compose
working-directory: ./template-compose
run: ./gradlew detekt
- name: Archive Detekt reports on template-compose
uses: actions/upload-artifact@v2
with:
name: DetektReportsTemplateCompose
path: template-compose/build/reports/detekt/
- name: Run unit tests with Kover on template-compose
working-directory: ./template-compose
run: ./gradlew koverHtmlReport
- name: Archive code coverage reports on template-compose
uses: actions/upload-artifact@v2
with:
name: CodeCoverageReportsTemplateCompose
path: template-compose/app/build/reports/kover/
# sample-xml
- name: Run Detekt on sample-xml
working-directory: ./deprecated/sample-xml
run: ./gradlew detekt
- name: Archive Detekt reports on sample-xml
uses: actions/upload-artifact@v2
with:
name: DetektReportsTemplateXML
path: deprecated/sample-xml/build/reports/detekt/
- name: Run unit tests with Kover on sample-xml
working-directory: ./deprecated/sample-xml
run: ./gradlew koverHtmlReport
- name: Archive code coverage reports on sample-xml
uses: actions/upload-artifact@v2
with:
name: CodeCoverageReportsTemplateXML
path: deprecated/sample-xml/app/build/reports/kover/
# sample-compose
- name: Run Detekt on sample-compose
working-directory: ./sample-compose
run: ./gradlew detekt
- name: Archive Detekt reports on sample-compose
uses: actions/upload-artifact@v2
with:
name: DetektReportsTemplateCompose
path: sample-compose/build/reports/detekt/
- name: Run unit tests with Kover on sample-compose
working-directory: ./sample-compose
run: ./gradlew koverHtmlReport
- name: Archive code coverage reports on sample-compose
uses: actions/upload-artifact@v2
with:
name: CodeCoverageReportsTemplateCompose
path: sample-compose/app/build/reports/kover/