From 3336f76f2b3663211a7d63057bdafb9983a8d835 Mon Sep 17 00:00:00 2001 From: Owen Carlsen Date: Fri, 23 Feb 2024 16:40:07 -0800 Subject: [PATCH] Updating for new SonarCloud project --- .github/workflows/build.yml | 20 ++++++++++---------- pom.xml | 11 ++++++----- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 25d073b..f105280 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,31 +1,31 @@ -name: Build +name: SonarCloud on: push: branches: - develop pull_request: types: [opened, synchronize, reopened] - workflow_dispatch: jobs: build: - name: Build + name: Build and analyze runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 11 - uses: actions/setup-java@v1 + - name: Set up JDK 17 + uses: actions/setup-java@v3 with: - java-version: 11 + java-version: 17 + distribution: 'zulu' # Alternative distribution options are available. - name: Cache SonarCloud packages - uses: actions/cache@v1 + uses: actions/cache@v3 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar - name: Cache Maven packages - uses: actions/cache@v1 + uses: actions/cache@v3 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} @@ -34,4 +34,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \ No newline at end of file + run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=ocarlsen_mock-slf4j-impl \ No newline at end of file diff --git a/pom.xml b/pom.xml index ce9cf0a..aa46d42 100644 --- a/pom.xml +++ b/pom.xml @@ -52,16 +52,16 @@ UTF-8 11 + + ${maven.compiler.release} + ${maven.compiler.release} + 2.0.0 - ocarlsen_mock-slf4j-impl + ocarlsen https://sonarcloud.io - - - ${maven.compiler.release} - ${maven.compiler.release} @@ -226,6 +226,7 @@ ${site.path} + true