From 819065fd7784f6b4295d65628476f31e1e512df2 Mon Sep 17 00:00:00 2001 From: Marc Nuri Date: Wed, 24 Nov 2021 15:11:32 +0100 Subject: [PATCH] ci: Update pipelines to verify compilation on Java 17 Signed-off-by: Marc Nuri --- .github/workflows/build.yml | 2 +- .github/workflows/sonar.yml | 4 ++-- .github/workflows/windows-build.yml | 5 +++-- .../fabric8/kubernetes/client/utils/SerializationTest.java | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6dddf618bd0..aa0f91e9533 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [8,11] + java: [8,17] steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index dd395eac167..0d00b036a2d 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -43,10 +43,10 @@ jobs: with: # Shallow clones should be disabled for a better relevancy of analysis fetch-depth: 0 - - name: Setup Java 11 # Move Sonar analysis to Java 11 + - name: Setup Java 17 uses: actions/setup-java@v2 with: - java-version: '11' + java-version: '17' distribution: 'temurin' - name: Maven Sonar run: mvn ${MAVEN_ARGS} clean install sonar:sonar -Psonar diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 5f302022ac1..d365a73afc1 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -33,14 +33,15 @@ jobs: runs-on: windows-latest strategy: matrix: - java: [11] + java: [17] steps: - name: Checkout uses: actions/checkout@v3 - name: Setup Java - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: java-version: ${{ matrix.java }} + distribution: 'temurin' - name: Build Project run: mvn clean install diff --git a/kubernetes-client-api/src/test/java/io/fabric8/kubernetes/client/utils/SerializationTest.java b/kubernetes-client-api/src/test/java/io/fabric8/kubernetes/client/utils/SerializationTest.java index 46a7a629b54..9f244fc52a5 100644 --- a/kubernetes-client-api/src/test/java/io/fabric8/kubernetes/client/utils/SerializationTest.java +++ b/kubernetes-client-api/src/test/java/io/fabric8/kubernetes/client/utils/SerializationTest.java @@ -162,7 +162,7 @@ void testSerializeYamlWithAlias() { .isNotNull() .hasFieldOrPropertyWithValue("metadata.name", "test-pod-with-alias") .hasFieldOrPropertyWithValue("spec.nodeSelector.workload", "build") - .hasFieldOrPropertyWithValue("spec.tolerations.size", 1) + .returns(1, p -> p.getSpec().getTolerations().size()) .hasFieldOrPropertyWithValue("spec.securityContext.runAsGroup", 1000L) .hasFieldOrPropertyWithValue("spec.securityContext.runAsUser", 1000L) .extracting(Pod::getSpec).extracting(PodSpec::getContainers).asList()