diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ba117227..1fd3ab0c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -29,10 +29,29 @@ jobs: sonar-scan: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@master with: fetch-depth: 0 - - name: Scan - uses: SonarSource/sonarcloud-github-action@master + - name: Setup Java + uses: actions/setup-java@master + with: + distribution: 'adopt' + java-version: 17 + - name: Cache SonarCloud packages + uses: actions/cache@v3 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Cache Maven packages + uses: actions/cache@v3 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Analyze + run: mvn -B verify -Psonar env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/README.md b/README.md index 7bc635d8..04252a30 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,15 @@ Release + +Sonar Status + + +Spring Boot + + +Java + GitHub stars @@ -18,12 +27,6 @@ Gitee forks - -Release - - -Release - ## 简介 diff --git a/continew-starter-dependencies/pom.xml b/continew-starter-dependencies/pom.xml index 85d0b656..6e05ad7e 100644 --- a/continew-starter-dependencies/pom.xml +++ b/continew-starter-dependencies/pom.xml @@ -76,6 +76,7 @@ 1.5.0 2.40.0 + 3.9.1.2184 @@ -543,6 +544,12 @@ spotless-maven-plugin ${spotless.version} + + + org.sonarsource.scanner.maven + sonar-maven-plugin + ${sonar.version} + @@ -604,5 +611,35 @@ + + + sonar + + https://sonarcloud.io + charles7c + Charles7c_continew-starter + ${project.groupId}:${project.artifactId} + + + false + + + + + org.sonarsource.scanner.maven + sonar-maven-plugin + ${sonar.version} + + + verify + + sonar + + + + + + + \ No newline at end of file