Skip to content

Commit 6f16fda

Browse files
Test against JDK 17, 21 and 25 in CI (#74) (#171)
1 parent 112e2f5 commit 6f16fda

1 file changed

Lines changed: 15 additions & 7 deletions

File tree

.github/workflows/maven_test.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,38 @@ concurrency:
1111

1212
jobs:
1313
test:
14-
name: Test
14+
name: Test (JDK ${{ matrix.java }})
1515
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
# 17 is the lowest JDK that can build this project: the Jackson 3
20+
# dependency requires a Java 17 baseline and the multi-release build has
21+
# a `release 17` compile execution. The Java 8 *target* stays covered by
22+
# `<release>${java.version}</release>` on the default-compile execution.
23+
java: [ 17, 21, 25 ]
1624
steps:
1725
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1826
with:
1927
fetch-depth: 0
20-
- name: Set up JDK 17
28+
- name: Set up JDK ${{ matrix.java }}
2129
uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0
2230
with:
23-
java-version: 17
31+
java-version: ${{ matrix.java }}
2432
distribution: 'temurin'
2533
- name: Cache and restore Maven packages on master
2634
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
2735
if: ${{ github.ref_name == 'master' }}
2836
with:
2937
path: ~/.m2
30-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
31-
restore-keys: ${{ runner.os }}-m2
38+
key: ${{ runner.os }}-m2-jdk${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}
39+
restore-keys: ${{ runner.os }}-m2-jdk${{ matrix.java }}
3240
- name: Restore Maven packages on PR
3341
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
3442
if: ${{ github.ref_name != 'master' }}
3543
with:
3644
path: ~/.m2
37-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
38-
restore-keys: ${{ runner.os }}-m2
45+
key: ${{ runner.os }}-m2-jdk${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}
46+
restore-keys: ${{ runner.os }}-m2-jdk${{ matrix.java }}
3947
- name: Build and Test
4048
run: ./mvnw clean verify -P integration-test

0 commit comments

Comments
 (0)