File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 6
6
pull_request :
7
7
types : [opened, synchronize, reopened]
8
8
jobs :
9
- sonarcloud :
10
- name : SonarCloud
9
+ build :
10
+ name : Build
11
11
runs-on : ubuntu-latest
12
12
steps :
13
- - uses : actions/checkout@v3
13
+ - uses : actions/checkout@v4
14
14
with :
15
15
fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
16
+ - uses : actions/setup-go@v4
17
+ with :
18
+ go-version : ' ^1.21' # The Go version to download (if necessary) and use.
19
+ - name : Build
20
+ run : go build -v ./...
21
+ - name : Test
22
+ run : go test -race -json -covermode=atomic -coverprofile=cover.out -p=10 ./... > result.json
16
23
- name : SonarCloud Scan
17
24
uses : SonarSource/sonarcloud-github-action@master
18
25
env :
Original file line number Diff line number Diff line change @@ -14,3 +14,6 @@ sonar.test.inclusions=**/*_test.go
14
14
15
15
# Encoding of the source code. Default is default system encoding
16
16
sonar.sourceEncoding =UTF-8
17
+
18
+ sonar.go.coverage.reportPaths =cover.out
19
+ sonar.go.tests.reportPaths =result.json
You can’t perform that action at this time.
0 commit comments