File tree Expand file tree Collapse file tree 4 files changed +63
-36
lines changed Expand file tree Collapse file tree 4 files changed +63
-36
lines changed Original file line number Diff line number Diff line change 1616 "." : {}
1717 },
1818 "extra-files" : [
19- " README.md"
19+ " README.md" ,
20+ " sonar-project.properties"
2021 ]
2122}
Original file line number Diff line number Diff line change 77
88jobs :
99
10- test :
11- runs-on : ubuntu-latest
12- steps :
13-
14- - name : Checkout
15- uses : actions/checkout@v4
16- with :
17- fetch-depth : 0
18-
19- - name : Set up Go
20- uses : actions/setup-go@v5
21- with :
22- go-version-file : go.mod
23-
24- - name : Run tests
25- run : |
26- go test \
27- -race \
28- -count=1 \
29- -vet=all \
30- -timeout 3m \
31- -coverpkg=./... \
32- -covermode=atomic \
33- -coverprofile=coverage.out \
34- ./...
35- go tool cover \
36- -html=coverage.out \
37- -o coverage.html
38-
39- - name : Upload assets
40- uses : actions/upload-artifact@v4
41- with :
42- name : coverage
43- path : coverage.*
44-
4510 build :
4611 runs-on : ubuntu-latest
4712 steps :
Original file line number Diff line number Diff line change 1+ name : test
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ types : [opened, synchronize, reopened]
9+
10+ jobs :
11+
12+ test :
13+ runs-on : ubuntu-latest
14+ steps :
15+
16+ - name : Checkout
17+ uses : actions/checkout@v4
18+ with :
19+ fetch-depth : 0
20+
21+ - name : Set up Go
22+ uses : actions/setup-go@v5
23+ with :
24+ go-version-file : go.mod
25+
26+ - name : Run tests
27+ run : |
28+ go test \
29+ -race \
30+ -count=1 \
31+ -vet=all \
32+ -timeout 3m \
33+ -coverpkg=./... \
34+ -covermode=atomic \
35+ -coverprofile=coverage.out \
36+ ./...
37+ go tool cover \
38+ -html=coverage.out \
39+ -o coverage.html
40+
41+ - name : SonarCloud Scan
42+ uses :
SonarSource/[email protected] 43+ env :
44+ SONAR_TOKEN : ${{ secrets.SONARCLOUD_TOKEN }}
45+
46+ - name : Upload assets
47+ uses : actions/upload-artifact@v4
48+ with :
49+ name : coverage
50+ path : coverage.*
Original file line number Diff line number Diff line change 1+ sonar.organization =firebolt-db
2+ sonar.projectKey =firebolt-db_mcp-server
3+ sonar.projectName =firebolt-db/mcp-server
4+ sonar.projectVersion =0.2.0 # x-release-please-version
5+
6+ sonar.sources =.
7+ sonar.exclusions =**/*_test.go,cmd/docs-scrapper/**
8+
9+ sonar.tests =.
10+ sonar.test.inclusions =**/*_test.go
11+ sonar.go.coverage.reportPaths =coverage.out
You can’t perform that action at this time.
0 commit comments