From 4cef9415633cbcff4ceecf5103031c002cdfb07d Mon Sep 17 00:00:00 2001 From: bagas Date: Thu, 22 Jan 2026 22:05:02 +0700 Subject: [PATCH] ci: update SonarQube action configuration --- .gitea/workflows/sonarqube.yml | 2 +- .gitignore | 3 ++- sonar-project.properties | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/sonarqube.yml b/.gitea/workflows/sonarqube.yml index dc03a14..b4ca121 100644 --- a/.gitea/workflows/sonarqube.yml +++ b/.gitea/workflows/sonarqube.yml @@ -24,7 +24,7 @@ jobs: run: go mod tidy - name: Run tests with coverage - run: go test ./... -coverprofile=coverage + run: go test ./... -coverprofile=coverage -json > test-results.json - name: SonarQube Scan uses: SonarSource/sonarqube-scan-action@v7.0.0 diff --git a/.gitignore b/.gitignore index 6c907a9..fd6e5af 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ id_rsa* tmp certs app -coverage \ No newline at end of file +coverage +test-results.json \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties index 626044d..e42d453 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,3 +1,6 @@ sonar.projectKey=tunnel-please sonar.go.coverage.reportPaths=coverage -sonar.test.inclusions=**/*_test.go \ No newline at end of file +sonar.test.inclusions=**/*_test.go +sonar.test.exclusions=**/vendor/** +sonar.exclusions=**/*_test.go,**/vendor/** +sonar.go.tests.reportPaths=test-results.json \ No newline at end of file