-
Notifications
You must be signed in to change notification settings - Fork 18
68 lines (57 loc) · 1.63 KB
/
pr_checks.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
name: PR checks
run-name: Running static code analysis and unit tests
on:
push:
branches:
- "dev"
pull_request:
branches:
- "dev"
- "releases/**"
jobs:
static-analysis-check:
name: Static code analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Set up JDK 17"
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
cache: gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: "Run static analysis"
run: ./gradlew detektAll mergeLintSarif
continue-on-error: false
- name: "Upload Detkt sarif results"
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: build/reports/detekt/detekt.sarif
category: detekt
- name: "Upload Lint sarif results"
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: build/reports/lint-merged.sarif
category: lint
run-unit-tests:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Set up JDK 17"
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
cache: gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Run unit tests
run: ./gradlew testDebugUnitTest --continue
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: always()
with:
report_paths: '**/build/test-results/**/TEST-*.xml'