From 1a8c589083f80eddd2fe7e4c99751c699dd4d357 Mon Sep 17 00:00:00 2001 From: Charles7c Date: Tue, 30 Jan 2024 23:35:55 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=B4=A8=E9=87=8F=E6=89=AB=E6=8F=8F=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 27 ++++++++++++++++--- README.md | 15 ++++++----- continew-starter-dependencies/pom.xml | 37 +++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 10 deletions(-) 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