-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (47 loc) · 1.5 KB
/
ci-jacoco.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
name: 'ContinuousIntegration'
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
jobs:
ContinuousIntegration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
with:
arguments: build
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/dev' }}
- name: Jacoco Report to PR
id: jacoco
uses: madrapps/jacoco-report@v1.6.1
with:
paths: ${{ github.workspace }}/build/jacocoReport/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 80
debug-mode: false
title: Code Coverage
update-comment: true
- name: Upload jacoco HTML report
uses: actions/upload-artifact@v4
with:
name: jacoco-html-report
path: ${{ github.workspace }}/build/jacocoReport/test/html
- name: Get the Coverage info
run: |
echo "Total coverage ${{ steps.jacoco.outputs.coverage-overall }}"
echo "Changed Files coverage ${{ steps.jacoco.outputs.coverage-changed-files }}"