Skip to content

Commit

Permalink
chore: update sonar scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
ehrdi committed Aug 7, 2024
1 parent e9c77ad commit 3ed231e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 19 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/sonar_scanner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Run Tests

on:
workflow_call:
workflow_dispatch:

jobs:
sonar-scan:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
- name: Setup Gradle 8.9
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.9
- name: Run SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
- name: Setup Gradle 8.8
- name: Setup Gradle 8.9
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.9
Expand Down
20 changes: 2 additions & 18 deletions .github/workflows/test_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,7 @@ jobs:

sonar-scan:
needs: [test]
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
- name: Setup Gradle 8.8
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.9
- name: Run SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
uses: ./.github/workflows/sonar_scanner.yml

build-and-publish:
needs: [test, sonar-scan]
Expand All @@ -41,7 +25,7 @@ jobs:
with:
java-version: '17'
distribution: 'adopt'
- name: Setup Gradle 8.8
- name: Setup Gradle 8.9
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.9
Expand Down

0 comments on commit 3ed231e

Please sign in to comment.