Skip to content

Commit

Permalink
chore: Sonar scanner runs with Java 17 (#3288)
Browse files Browse the repository at this point in the history
* Separate coverage and sonar tasks.

Signed-off-by: Petr Weinfurt <[email protected]>

* Use variable for architecture

Signed-off-by: Petr Weinfurt <[email protected]>

* Use variable for architecture

Signed-off-by: Petr Weinfurt <[email protected]>

* Refine messages

Signed-off-by: Petr Weinfurt <[email protected]>

* Increase timeout

Signed-off-by: Petr Weinfurt <[email protected]>

---------

Signed-off-by: Petr Weinfurt <[email protected]>
  • Loading branch information
weinfurt authored Jan 24, 2024
1 parent d955fbc commit fdc1e96
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]
Expand All @@ -26,15 +26,15 @@ runs:
shell: bash

- name: Cache Gradle packages
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
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
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -1501,7 +1501,9 @@ jobs:

- uses: ./.github/actions/setup
with:
jdkVersion: 11
jdkVersion: |
17
8
- uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -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 }}
Expand Down

0 comments on commit fdc1e96

Please sign in to comment.