diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 1c310f0..15789ea 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -27,3 +27,9 @@ jobs: - name: vulncheck run: make vulncheck + + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITTOKEN }} + SONAR_TOKEN: ${{ secrets.SONARTOKEN }} diff --git a/Makefile b/Makefile index 78f2525..39751b9 100644 --- a/Makefile +++ b/Makefile @@ -2,10 +2,9 @@ format: @go fmt ./... test: - @go test -cover -v ./... + @go test ./... -coverprofile cover.out cover: - @go test ./... -coverprofile cover.out @go tool cover -html cover.out -o cover.html run: diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..557a0b4 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,4 @@ +sonar.projectKey=jvmistica_telegram-assistant +sonar.organization=jvmistica +sonar.go.coverage.reportPaths=cover.out +sonar.test.inclusions=**/*_test.go