File tree Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,11 @@ on: [push]
5
5
jobs :
6
6
build :
7
7
runs-on : ubuntu-latest
8
+ strategy :
9
+ fail-fast : true
10
+ matrix :
11
+ java : [8, 16] # Define matrix for Java versions
12
+
8
13
steps :
9
14
- uses : actions/checkout@v4
10
15
with :
@@ -22,22 +27,22 @@ jobs:
22
27
key : ${{ runner.os }}-parsec_docker_cache-${{ github.sha }}
23
28
restore-keys : |
24
29
${{ runner.os }}-parsec_docker_cache-
25
- - name : Set up JDK 16
26
- uses : actions/setup-java@v4
27
- with :
28
- java-version : " 16"
29
- distribution : " zulu"
30
- architecture : x64
31
- cache : maven
32
- - name : Build with Maven
33
- # still needs work to get tests running on java 16
34
- run : ./mvnw --batch-mode clean verify -DskipTests=true
35
- - name : Set up JDK 8
30
+
31
+ # Use the matrix variable to set up the correct JDK
32
+ - name : Set up JDK ${{ matrix.java }}
36
33
uses : actions/setup-java@v4
37
34
with :
38
- java-version : " 8 "
35
+ java-version : ${{ matrix.java }}
39
36
distribution : " zulu"
40
37
architecture : x64
41
38
cache : maven
42
- - name : Build with Maven
39
+
40
+ # Run tests only for Java 8
41
+ - name : Maven build with Java 8 - includes tests
42
+ if : matrix.java == '8'
43
43
run : ./mvnw --batch-mode clean verify
44
+
45
+ # Skip tests for Java 16
46
+ - name : Maven build with Java 16 - skips tests
47
+ if : matrix.java == '16'
48
+ run : ./mvnw --batch-mode clean verify -DskipTests=true # still needs work to get tests running on java 16
You can’t perform that action at this time.
0 commit comments