Skip to content

Commit 0f68152

Browse files
authored
Merge pull request #6 from Staffbase/add-actions
Update Github Actions
2 parents 39f3718 + efbfb00 commit 0f68152

File tree

3 files changed

+42
-53
lines changed

3 files changed

+42
-53
lines changed

.github/workflows/scorecard.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,30 @@ jobs:
1515
go-version-file: 'go.mod'
1616

1717
- name: Test
18-
run: go test ./...
18+
run: go test -covermode=atomic -coverpkg=./... -coverprofile=test.cov -v ./...
19+
20+
- name: upload coverage data
21+
uses: actions/upload-artifact@v4
22+
with:
23+
name: test.cov
24+
path: test.cov
25+
retention-days: 1
26+
27+
sonar:
28+
name: Run SonarCloud Analysis
29+
runs-on: ubuntu-22.04
30+
needs: test
31+
steps:
32+
- name: Check out code
33+
uses: actions/checkout@v4
34+
- name: download coverage data from GitHub storage
35+
uses: actions/download-artifact@v4
36+
with:
37+
path: cov/
38+
merge-multiple: true
39+
- name: SonarCloud Scan
40+
uses: sonarsource/[email protected]
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
44+

sonar-project.properties

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
sonar.organization=staffbase
2+
sonar.projectKey=com.staffbase:gosaml2
3+
sonar.projectDescription=Our very own gosaml2 fork
4+
sonar.links.homepage=https://github.com/Staffbase/gosaml2
5+
sonar.sourceEncoding=UTF-8
6+
7+
sonar.scm.provider=git
8+
9+
sonar.sources=.
10+
sonar.exclusions=**/*_test.go
11+
12+
sonar.tests=.
13+
sonar.test.inclusions=**/*_test.go
14+
15+
sonar.go.coverage.reportPaths=cov/*.cov

0 commit comments

Comments
 (0)