From 615c48990fc0a2b3f7ca9b3a68c4306507f59705 Mon Sep 17 00:00:00 2001 From: Sofiene BEN KHEMIS Date: Mon, 10 May 2021 14:38:04 +0200 Subject: [PATCH] Sonar --- .github/workflows/build.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b1b62a9 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,31 @@ +name: SonarCloud +on: + push: + branches: + - sonar +jobs: + build: + runs-on: ubuntu-16.04 + steps: + - uses: actions/checkout@v1 + - name: Set up JDK + 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: Analyze with SonarCloud + run: mvn -B verify sonar:sonar -Dsonar.projectKey=sofieneBK_hands-on-hexagonal-architecture-with-spring-boot -Dsonar.organization=sofienebk -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file