-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (73 loc) · 2.25 KB
/
verify.yaml
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
name: verify
on:
pull_request:
path-ignore:
- 'docs/**'
- 'README.md'
env:
JDK_VERSION: 21
GRADLE_OPTS: -Dorg.gradle.daemon=false
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
name: Build and Run Tests
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
pull-requests: write
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up JDK ${{ env.JDK_VERSION }}
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '${{ env.JDK_VERSION }}'
cache: 'gradle'
- name: Build and Run Tests
run: ./gradlew test koverXmlReport
- name: Publish Test Report
uses: mikepenz/action-junit-report@v5
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
- name: Publish Kover Report
uses: madrapps/[email protected]
if: success() || failure() # always run even if the previous step fails
with:
paths: |
${{ github.workspace }}/build/reports/kover/report.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 50
min-coverage-changed-files: 60
- name: Coverage verify
run: ./gradlew koverVerify
detekt:
name: Detekt
runs-on: ubuntu-latest
permissions:
# required for all workflows
security-events: write
checks: write
# only required for workflows in private repositories
actions: read
contents: read
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up JDK ${{ env.JDK_VERSION }}
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '${{ env.JDK_VERSION }}'
cache: 'gradle'
- name: Run Detekt
run: ./gradlew detekt
- name: Publish Detekt Report
uses: jwgmeligmeyling/checkstyle-github-action@master
if: success() || failure() # always run even if the previous step fails
with:
path: 'build/reports/detekt/merge.xml'