diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a52ace3..7d1bb84 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,24 +1,19 @@ +name: SonarCloud on: - # Trigger analysis when pushing in master or pull requests, and when creating - # a pull request. push: branches: - beanstalk-java8 - pull_request: - types: [opened, synchronize, reopened] -name: Main Workflow jobs: - sonarcloud: - runs-on: ubuntu-latest + build: + runs-on: ubuntu-16.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v1 + - name: Set up JDK + uses: actions/setup-java@v1 with: - # Disabling shallow clone is recommended for improving relevancy of reporting - fetch-depth: 0 - - name: Remove pom - run: rm -f pom.xml - - name: SonarCloud Scan - uses: sonarsource/sonarcloud-github-action@master + java-version: '8' + - name: Analyze with SonarCloud + run: ./mvnw -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 diff --git a/sonar-project.properties b/sonar-project.properties deleted file mode 100644 index 12aeb0b..0000000 --- a/sonar-project.properties +++ /dev/null @@ -1,6 +0,0 @@ -sonar.organization=sofienebk -sonar.projectKey=sofieneBK_hands-on-hexagonal-architecture-with-spring-boot - -# relative paths to source directories. More details and properties are described -# in https://sonarcloud.io/documentation/project-administration/narrowing-the-focus/ -sonar.sources=. \ No newline at end of file