From cf356f2492744ca4f7f7bbc067d7c0b355736aa4 Mon Sep 17 00:00:00 2001 From: Carm Date: Mon, 20 Dec 2021 18:40:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[U]=20=E4=BD=BF=E7=94=A8=20SonarCloud=20?= =?UTF-8?q?=E5=88=86=E6=9E=90=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 619afa7..a73a1ed 100644 --- a/pom.xml +++ b/pom.xml @@ -4,6 +4,15 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 + + 11 + 11 + UTF-8 + UTF-8 + carmjos + https://sonarcloud.io + + cc.carm.lib easysql-parent pom @@ -55,13 +64,6 @@ ${project.url}/actions/workflows/maven.yml - - 11 - 11 - UTF-8 - UTF-8 - - @@ -252,4 +254,4 @@ - \ No newline at end of file + From b423000fe579722d8daa0361bf5a5f404c3ba195 Mon Sep 17 00:00:00 2001 From: Carm Date: Mon, 20 Dec 2021 18:41:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[U]=20=E4=BD=BF=E7=94=A8SonarCloud=E5=88=86?= =?UTF-8?q?=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/sonar-analyze.yml | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/sonar-analyze.yml diff --git a/.github/workflows/sonar-analyze.yml b/.github/workflows/sonar-analyze.yml new file mode 100644 index 0000000..609ad3c --- /dev/null +++ b/.github/workflows/sonar-analyze.yml @@ -0,0 +1,36 @@ +name: Build +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened] +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + 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 + with: + java-version: 11 + - name: Cache SonarCloud packages + uses: actions/cache@v1 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Cache Maven packages + uses: actions/cache@v1 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Build and analyze + 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 -Dsonar.projectKey=CarmJos_EasySQL