From 39e1f3ac8169c35b6e16f47dd4722b807cf88ede Mon Sep 17 00:00:00 2001 From: Simon Bengtsson Date: Sun, 21 Sep 2025 21:46:55 +0200 Subject: [PATCH 1/3] Adding SonarCloud to actions --- .github/workflows/test.yml | 4 ++++ sonar-project.properties | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 sonar-project.properties diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9ec1852..974d37b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,3 +37,7 @@ jobs: - name: Running Tests run: | make test + + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@fd88b7d7ccbaefd23d8f36f73b59db7a3d246602 # v6.0.0 + if: env.SONAR_TOKEN diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..958b248 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,5 @@ +sonar.projectKey=SlyngDK_node-drain +sonar.organization=slyngdk +sonar.projectName=node-drain +sonar.go.coverage.reportPaths=cover.out +sonar.go.exclusions=**/*.pb.go From 5e7e744f7004591809ae3d5c907263b236edeab4 Mon Sep 17 00:00:00 2001 From: Simon Bengtsson Date: Sun, 21 Sep 2025 21:57:13 +0200 Subject: [PATCH 2/3] Adding SonarCloud to actions --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 974d37b..28e11e9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,3 +41,5 @@ jobs: - name: SonarQube Scan uses: SonarSource/sonarqube-scan-action@fd88b7d7ccbaefd23d8f36f73b59db7a3d246602 # v6.0.0 if: env.SONAR_TOKEN + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From c6e3cbda1eb39d76d4f8fa014e5d237350184b73 Mon Sep 17 00:00:00 2001 From: Simon Bengtsson Date: Sun, 21 Sep 2025 22:30:31 +0200 Subject: [PATCH 3/3] Adding SonarCloud to actions --- .github/workflows/lint.yml | 7 +++++++ sonar-project.properties | 1 + 2 files changed, 8 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2ef7717..5a470d4 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -34,6 +34,13 @@ jobs: uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0 with: version: v2.4.0 + args: '--output.checkstyle.path report.xml' + + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@fd88b7d7ccbaefd23d8f36f73b59db7a3d246602 # v6.0.0 + if: env.SONAR_TOKEN + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} buf-lint: runs-on: ubuntu-latest diff --git a/sonar-project.properties b/sonar-project.properties index 958b248..68ede8c 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -3,3 +3,4 @@ sonar.organization=slyngdk sonar.projectName=node-drain sonar.go.coverage.reportPaths=cover.out sonar.go.exclusions=**/*.pb.go +sonar.go.golangci-lint.reportPaths=report.xml