From fdc1e963f56c883579fecfdecee57655bd729ee0 Mon Sep 17 00:00:00 2001 From: Petr Weinfurt Date: Wed, 24 Jan 2024 15:32:50 +0100 Subject: [PATCH] chore: Sonar scanner runs with Java 17 (#3288) * Separate coverage and sonar tasks. Signed-off-by: Petr Weinfurt * Use variable for architecture Signed-off-by: Petr Weinfurt * Use variable for architecture Signed-off-by: Petr Weinfurt * Refine messages Signed-off-by: Petr Weinfurt * Increase timeout Signed-off-by: Petr Weinfurt --------- Signed-off-by: Petr Weinfurt --- .github/actions/setup/action.yml | 10 +++++----- .github/workflows/integration-tests.yml | 16 +++++++++++----- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index b31a54a721..c4fbc6aa03 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -11,12 +11,12 @@ runs: using: "composite" steps: - name: Set up JDK ${{ inputs.jdkVersion }} - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: - distribution: 'zulu' + distribution: 'semeru' java-version: ${{ inputs.jdkVersion }} - name: Set up Node - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: '18' - run: npm install -g npm@9.3.1 @@ -26,7 +26,7 @@ runs: shell: bash - name: Cache Gradle packages - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/.gradle/caches @@ -34,7 +34,7 @@ runs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - name: Cache Node.js modules - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/.npm diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 664242616a..fd56c02ca8 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1491,7 +1491,7 @@ jobs: PublishResults: needs: [CITests,CITestsWithInfinispan,CITestsZosmfRsu2012,CITestsWithRedisReplica,CITestsWithRedisSentinel,CITestsInternalPort,CloudGatewayProxy,CloudGatewayServiceRouting] runs-on: ubuntu-latest - timeout-minutes: 15 + timeout-minutes: 20 steps: - uses: actions/checkout@v4 @@ -1501,7 +1501,9 @@ jobs: - uses: ./.github/actions/setup with: - jdkVersion: 11 + jdkVersion: | + 17 + 8 - uses: actions/download-artifact@v3 with: @@ -1541,9 +1543,13 @@ jobs: path: cloudgatewayservicerouting - name: Code coverage and publish results - run: > - ./gradlew --info coverage sonar -Dresults="containercitests/results,citestswithinfinispan/results,containercitestszosmfrsu2012/results,ContainerCITestsWithRedisReplica/results,ContainerCITestsWithRedisSentinel/results,containercitestsinternalport/results,cloudgatewayproxy/results,citestswebsocketchaoticha/results,cloudgatewayservicerouting/results,containercitestszaas/results" - -Psonar.host.url=$SONAR_HOST_URL -Dsonar.token=$SONAR_TOKEN -Partifactory_user=$ARTIFACTORY_USERNAME -Partifactory_password=$ARTIFACTORY_PASSWORD + run: | + export JAVA_HOME=$JAVA_HOME_8_${{ runner.arch }} + echo Execute Code coverage task using Java 8: JAVA_HOME = $JAVA_HOME + ./gradlew --info coverage -Dresults="containercitests/results,citestswithinfinispan/results,containercitestszosmfrsu2012/results,ContainerCITestsWithRedisReplica/results,ContainerCITestsWithRedisSentinel/results,containercitestsinternalport/results,cloudgatewayproxy/results,citestswebsocketchaoticha/results,cloudgatewayservicerouting/results,containercitestszaas/results" + export JAVA_HOME=$JAVA_HOME_17_${{ runner.arch }} + echo Execute Sonar scanner using Java 17: JAVA_HOME = $JAVA_HOME + ./gradlew --info sonar -Psonar.host.url=$SONAR_HOST_URL -Dsonar.token=$SONAR_TOKEN -Partifactory_user=$ARTIFACTORY_USERNAME -Partifactory_password=$ARTIFACTORY_PASSWORD env: ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}