File tree Expand file tree Collapse file tree 1 file changed +40
-3
lines changed Expand file tree Collapse file tree 1 file changed +40
-3
lines changed Original file line number Diff line number Diff line change 1515
1616jobs :
1717
18- coverage :
18+ build-and-test :
1919 name : " Go CI Tests Coverage"
2020 strategy :
2121 fail-fast : false
@@ -47,15 +47,52 @@ jobs:
4747 - name : Coverage
4848 run : go tool cover -func="coverage.out"
4949
50+ - name : Upload coverage artifact
51+ uses : actions/upload-artifact@v4
52+ with :
53+ name : coverage-report
54+ path : coverage.out
55+
56+ codecov :
57+ name : Upload to Codecov
58+ runs-on : ubuntu-24.04
59+ needs : build-and-test
60+
61+ steps :
62+ - name : Checkout repository
63+ uses : actions/checkout@v5
64+ with :
65+ fetch-depth : 0
66+ - name : Download coverage artifact
67+ uses : actions/download-artifact@v5
68+ with :
69+ name : coverage-report
70+
5071 - name : Upload coverage reports to Codecov with GitHub Action
5172 uses : codecov/codecov-action@v5
5273 with :
74+ files : coverage.out
5375 token : ${{ secrets.CODECOV_TOKEN }} # required
5476 verbose : true # optional (default = false)
5577
56- - name : Analyze with SonarCloud
78+ sonarqube :
79+ name : Analyze with SonarQube
80+ runs-on : ubuntu-24.04
81+ needs : build-and-test
82+
83+ steps :
84+ - name : Checkout repository
85+ uses : actions/checkout@v5
86+ with :
87+ fetch-depth : 0
88+
89+ - name : Download coverage artifact
90+ uses : actions/download-artifact@v5
91+ with :
92+ name : coverage-report
93+
94+ - name : SonarQube Scan
5795 uses : SonarSource/sonarqube-scan-action@master
5896 env :
5997 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
60- # Needed to get PR information, if any
6198 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments