-
Notifications
You must be signed in to change notification settings - Fork 13
65 lines (60 loc) · 1.62 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
61
62
63
64
65
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: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: current
- name: Gradle Build and Test
run: gradle --build-cache --configuration-cache build test koverXmlReport
- name: Add coverage report to PR
id: kover
uses: mi-kas/kover-report@v1
if: github.repository == 'Trendyol/stove'
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@v5
if: github.repository == 'Trendyol/stove'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}