diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 178ae79..0cb365a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,13 @@ jobs: uses: actions/checkout@v2 - name: Test - run: go test ./... + run: go test -coverprofile cover.out ./... + + - name: SonarCloud Scan + uses: sonarsource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} image-scan: name: Image Scan diff --git a/sonar-project.properties b/sonar-project.properties index 85e4196..07fd00d 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -7,4 +7,4 @@ sonar.exclusions=**/*_test.go,**/vendor/**,**/testdata/* sonar.tests=. sonar.test.inclusions=**/*_test.go sonar.test.exclusions=**/vendor/** -sonar.go.coverage.reportPaths=.cover/cover.out +sonar.go.coverage.reportPaths=cover.out