We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b9330a0 commit 5e890ddCopy full SHA for 5e890dd
.github/workflows/sonar.yml
@@ -0,0 +1,30 @@
1
+# This workflow will build a golang project
2
+# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
3
+
4
+name: Sonar Report
5
6
+on:
7
+ push:
8
+ branches: [ "main" ]
9
+ pull_request:
10
11
12
+jobs:
13
14
+ build:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
19
+ - name: Set up Go
20
+ uses: actions/setup-go@v5
21
+ with:
22
+ go-version: '1.23'
23
24
+ - name: Generate Sonar Report
25
+ run: go test -coverpkg=./... -coverprofile=coverage.out -json ./... > sonar-report.json
26
27
+ - name: Upload coverage reports to Sonar
28
+ uses: sonarsource/sonarcloud-github-action@master
29
+ env:
30
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
0 commit comments