-
Notifications
You must be signed in to change notification settings - Fork 2
75 lines (65 loc) · 1.64 KB
/
check.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
name: Run tests
on:
pull_request:
branches:
- main
concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true
jobs:
check:
strategy:
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/[email protected]
with:
distribution: temurin
java-version: 18
- name: Run unit tests
uses: gradle/[email protected]
with:
arguments: --no-configuration-cache check
- name: (Fail-only) Upload test report
if: "${{ failure() }}"
uses: actions/[email protected]
with:
name: Test report
path: build/reports
check-coverage:
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/[email protected]
with:
distribution: temurin
java-version: 18
- name: Run unit tests
uses: gradle/[email protected]
with:
arguments: --no-configuration-cache koverXmlReport
- name: Add coverage report to PR
id: kover
uses: mi-kas/kover-report@v1
with:
path: ${{ github.workspace }}/build/reports/kover/report.xml
token: ${{ secrets.GITHUB_TOKEN }}
title: Code Coverage
update-comment: true
min-coverage-overall: 80
min-coverage-changed-files: 80