From 7c176d6c7e50a27ad385368ed8fc59b3d04aee2d Mon Sep 17 00:00:00 2001 From: davidpavlovschi Date: Thu, 30 Jul 2026 21:48:40 +0300 Subject: [PATCH] Test against JDK 17, 21 and 25 in CI (#74) --- .github/workflows/maven_test.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/maven_test.yml b/.github/workflows/maven_test.yml index e7b338c..e0201ac 100644 --- a/.github/workflows/maven_test.yml +++ b/.github/workflows/maven_test.yml @@ -11,30 +11,38 @@ concurrency: jobs: test: - name: Test + name: Test (JDK ${{ matrix.java }}) runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + # 17 is the lowest JDK that can build this project: the Jackson 3 + # dependency requires a Java 17 baseline and the multi-release build has + # a `release 17` compile execution. The Java 8 *target* stays covered by + # `${java.version}` on the default-compile execution. + java: [ 17, 21, 25 ] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 - - name: Set up JDK 17 + - name: Set up JDK ${{ matrix.java }} uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 with: - java-version: 17 + java-version: ${{ matrix.java }} distribution: 'temurin' - name: Cache and restore Maven packages on master uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 if: ${{ github.ref_name == 'master' }} with: path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 + key: ${{ runner.os }}-m2-jdk${{ matrix.java }}-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2-jdk${{ matrix.java }} - name: Restore Maven packages on PR uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 if: ${{ github.ref_name != 'master' }} with: path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 + key: ${{ runner.os }}-m2-jdk${{ matrix.java }}-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2-jdk${{ matrix.java }} - name: Build and Test run: ./mvnw clean verify -P integration-test