Skip to content

Commit 30a6789

Browse files
authored
fix(2288): fix sonarqube setting (#21)
1 parent 20f6149 commit 30a6789

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

screwdriver.yaml

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
shared:
22
image: golang
33
environment:
4-
GOPATH: /sd/workspace
4+
GO111MODULE: on
55

66
jobs:
77
main:
8+
environment:
9+
SD_SONAR_OPTS: "-Dsonar.sources=./ -Dsonar.exclusions=**/*_test.go,**/vendor/** -Dsonar.tests=./ -Dsonar.test.inclusions=**/*_test.go -Dsonar.test.exclusions=**/vendor/** -Dsonar.go.coverage.reportPaths=${SD_ARTIFACTS_DIR}/coverage.out -Dsonar.go.tests.reportPaths=${SD_ARTIFACTS_DIR}/report.json"
810
requires: [~commit, ~pr]
911
steps:
1012
- modverify: go version; go mod verify
@@ -20,7 +22,8 @@ jobs:
2022
fi
2123
- vet: go vet ./...
2224
- build: go install -v ./...
23-
- test: go test -v ./...
25+
- test-setup: go get gotest.tools/[email protected]
26+
- test: gotestsum --format testname --jsonfile ${SD_ARTIFACTS_DIR}/report.json -- -coverprofile=${SD_ARTIFACTS_DIR}/coverage.out ./...
2427

2528
deploy:
2629
requires: main

0 commit comments

Comments
 (0)