-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (38 loc) · 1.08 KB
/
report-jacoco.yml
File metadata and controls
47 lines (38 loc) · 1.08 KB
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
name: Measure coverage
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }} # Utilisation du secret configuré
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn clean install
- name: Run tests and generate JaCoCo report
run: mvn test jacoco:report
- name: Upload JaCoCo report
uses: actions/upload-artifact@v4
with:
name: jacoco-report
path: target/site/jacoco
- name: Add coverage to PR
id: jacoco
uses: madrapps/jacoco-report@v1.6.1
with:
paths: |
${{ github.workspace }}/target/site/jacoco/jacoco.xml
token: ${{ secrets.REPO_ACCESS_TOKEN }}
min-coverage-overall: 40
min-coverage-changed-files: 60