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]
55jobs :
66 build :
77 runs-on : ubuntu-latest
8+ strategy :
9+ fail-fast : true
10+ matrix :
11+ java : [8, 16] # Define matrix for Java versions
12+
813 steps :
914 - uses : actions/checkout@v4
1015 with :
@@ -22,22 +27,22 @@ jobs:
2227 key : ${{ runner.os }}-parsec_docker_cache-${{ github.sha }}
2328 restore-keys : |
2429 ${{ 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 }}
3633 uses : actions/setup-java@v4
3734 with :
38- java-version : " 8 "
35+ java-version : ${{ matrix.java }}
3936 distribution : " zulu"
4037 architecture : x64
4138 cache : maven
42- - name : Build with Maven
39+
40+ # Run tests only for Java 8
41+ - name : Build with Maven (Java 8 - includes tests)
42+ if : matrix.java == '8'
4343 run : ./mvnw --batch-mode clean verify
44+
45+ # Skip tests for Java 16
46+ - name : Build with Maven (Java 16 - skips tests)
47+ if : matrix.java == '16'
48+ run : ./mvnw --batch-mode clean verify -DskipTests=true
You can’t perform that action at this time.
0 commit comments