-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 998 Bytes
/
Copy pathbuild.yml
File metadata and controls
46 lines (38 loc) · 998 Bytes
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
name: Java 21 CI (Maven)
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Build with Java 21
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: maven
- name: Verify Java version
run: java -version
- name: Build with Maven
run: mvn -B -ntp clean verify
- name: Upload JaCoCo HTML report as artifact
uses: actions/upload-artifact@v4
with:
name: jacoco-html-report
path: target/site/jacoco
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: target/site/jacoco/jacoco.xml
fail_ci_if_error: true
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}