-
Notifications
You must be signed in to change notification settings - Fork 12
60 lines (56 loc) · 1.46 KB
/
build.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
name: Build
on:
push:
branches: [ main ]
paths:
- 'examples/**'
- 'lib/**'
- 'starters/**'
- 'gradle/**'
- 'build.gradle.kts'
- 'settings.gradle.kts'
- 'buildSrc/**'
pull_request:
branches: [ main ]
paths:
- 'examples/**'
- 'lib/**'
- 'starters/**'
- 'gradle/**'
- 'build.gradle.kts'
- 'settings.gradle.kts'
- 'buildSrc/**'
jobs:
build-and-test:
runs-on: ubuntu-latest
services:
docker:
image: docker:dind
options: --privileged
steps:
- name: Configure JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- name: Check out Git repository
uses: actions/checkout@v4
- name: Gradle Build and Test
uses: gradle/gradle-build-action@v3.5.0
with:
arguments: --build-cache --configuration-cache build test koverXmlReport
- name: Add coverage report to PR
id: kover
uses: mi-kas/kover-report@v1
with:
path: |
${{ github.workspace }}/build/reports/kover/report.xml
title: Code Coverage
update-comment: true
min-coverage-overall: 80
min-coverage-changed-files: 80
coverage-counter-type: LINE
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}