From de2c191baa8bf05611cb076112da9e3f253044a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Garc=C3=ADa=20Fern=C3=A1ndez?= Date: Tue, 2 Aug 2022 12:47:30 +0200 Subject: [PATCH] chore: test report counter into sonarqube --- .github/workflows/sonarcloud.yml | 3 +-- .gitignore | 3 +++ sonar-project.properties | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 24469f50..20011d61 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -26,8 +26,7 @@ jobs: with: go-version: 1.17 - name: Test - run: go test -v -coverprofile=coverage.txt -covermode=atomic `go list ./... | grep -v test/acceptance` - + run: go test -v -coverprofile=coverage.txt -covermode=atomic `go list ./... | grep -v test/acceptance` -json > test-report.out - name: Coverage to Codecov uses: codecov/codecov-action@v2 diff --git a/.gitignore b/.gitignore index 90e90c38..4efd2327 100755 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,9 @@ debug.test # Mac .DS_Store +# Test reports +test-report.* + # Coverage coverage.* diff --git a/sonar-project.properties b/sonar-project.properties index 5806b082..a77a6a43 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -2,6 +2,7 @@ sonar.projectKey=golium sonar.projectName=Golium sonar.organization=telefonicatc2tech +sonar.go.tests.reportPaths=test-report.out sonar.go.coverage.reportPaths=coverage.txt sonar.go.golangci-lint.reportPaths=golangci-report.xml sonar.coverage.exclusions=**/*context.go,**/*logger.go,**/*steps.go,**/*client.go,**/mock/**/*.go