ci: automate Go tests and Sonar coverage reporting
This commit is contained in:
@@ -13,6 +13,18 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: '1.25.5'
|
||||
|
||||
- name: Install dependencies
|
||||
run: go mod tidy
|
||||
|
||||
- name: Run tests with coverage
|
||||
run: go test ./... -coverprofile=coverage
|
||||
|
||||
- name: SonarQube Scan
|
||||
uses: SonarSource/sonarqube-scan-action@v7.0.0
|
||||
env:
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
sonar.projectKey=tunnel-please
|
||||
sonar.go.coverage.reportPaths=coverage
|
||||
sonar.tests.inclusions=**/*_test.go
|
||||
sonar.test.inclusions=**/*_test.go
|
||||
Reference in New Issue
Block a user