Skip to content

Commit

Permalink
Merge pull request #686 from focus-shift/sonar-with-jdk11
Browse files Browse the repository at this point in the history
sonar: run sonar analyze with jdk 11
  • Loading branch information
derTobsch authored Dec 5, 2024
2 parents fd6994a + 03a06b2 commit b0a76ec
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:

jobs:
build:
name: build and analyse
name: Build
strategy:
matrix:
java: [ '11', '17', '21', '22', '23' ]
Expand All @@ -23,24 +23,39 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Build
run: ./mvnw -Pcoverage clean verify
- name: Analyse with SonarCloud
if: ${{ github.repository == 'focus-shift/jollyday' && matrix.java == 21 && matrix.os == 'ubuntu-24.04' && (github.event_name != 'pull_request' || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]')) }}
run: ./mvnw verify

sonarqube:
name: SonarQube Cloud
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 11 and 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: |
11
17
cache: 'maven'
- name: SonarQube Cloud Analysis
run: >
./mvnw -Pcoverage verify
sonar:sonar
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=focus-shift
-Dsonar.projectKey=focus-shift_jollyday
-Dsonar.java.jdkHome=${{ env.JAVA_HOME_11_X64 }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 comments on commit b0a76ec

Please sign in to comment.