Skip to content

Commit

Permalink
Merge pull request #19 from jvmistica/feat/enable-sonar-test-coverage
Browse files Browse the repository at this point in the history
feat: add sonar properties
  • Loading branch information
jvmistica committed Jul 22, 2023
2 parents 4b3ed55 + bea0a08 commit 86d0763
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sonar.projectKey=jvmistica_telegram-assistant
sonar.organization=jvmistica
sonar.go.coverage.reportPaths=cover.out
sonar.test.inclusions=**/*_test.go

0 comments on commit 86d0763

Please sign in to comment.