File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ version: 2.1
33jobs :
44 build :
55 docker :
6- - image : cimg/openjdk:17 .0
6+ - image : cimg/openjdk:23 .0
77 steps :
88 # Checkout the code as the first step.
99 - checkout
Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ test :
11+ runs-on : ubuntu-latest
12+ strategy :
13+ matrix :
14+ java-version : ['17', '21', '23']
15+
16+ steps :
17+ - uses : actions/checkout@v4
18+
19+ - name : Set up JDK ${{ matrix.java-version }}
20+ uses : actions/setup-java@v4
21+ with :
22+ java-version : ${{ matrix.java-version }}
23+ distribution : ' temurin'
24+
25+ - name : Cache Maven packages
26+ uses : actions/cache@v4
27+ with :
28+ path : ~/.m2
29+ key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
30+ restore-keys : ${{ runner.os }}-m2
31+
32+ - name : Run tests
33+ run : mvn clean test
34+
35+ - name : Generate test report
36+ run : mvn jacoco:report
37+
38+ - name : Upload coverage to Codecov
39+ if : matrix.java-version == '23'
40+ uses : codecov/codecov-action@v4
41+ with :
42+ file : ./target/site/jacoco/jacoco.xml
43+ fail_ci_if_error : false
44+
45+ build :
46+ runs-on : ubuntu-latest
47+ needs : test
48+
49+ steps :
50+ - uses : actions/checkout@v4
51+
52+ - name : Set up JDK 23
53+ uses : actions/setup-java@v4
54+ with :
55+ java-version : ' 23'
56+ distribution : ' temurin'
57+
58+ - name : Cache Maven packages
59+ uses : actions/cache@v4
60+ with :
61+ path : ~/.m2
62+ key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
63+ restore-keys : ${{ runner.os }}-m2
64+
65+ - name : Build with Maven
66+ run : mvn clean compile package -DskipTests
67+
68+ - name : Upload artifacts
69+ uses : actions/upload-artifact@v4
70+ with :
71+ name : jar-artifacts
72+ path : target/*.jar
Original file line number Diff line number Diff line change 5151 <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
5252 <project .reporting.outputEncoding>UTF-8</project .reporting.outputEncoding>
5353
54- <java .version>17 </java .version>
54+ <java .version>23 </java .version>
5555 <java .showDeprecation>true</java .showDeprecation>
5656 <java .showWarnings>true</java .showWarnings>
5757 <java .optimize>true</java .optimize>
You can’t perform that action at this time.
0 commit comments