Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add code coverage report generation to test.sh and upload once #72

Merged
merged 7 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/scripts/code-coverage.sh

This file was deleted.

2 changes: 1 addition & 1 deletion .github/scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ perform() {

check go "needs go from http://golang.org"

perform tests go test -v ./...
perform tests go test -v ./... -coverprofile cover.out

echo "\x1B[38;5;2msuccess.\x1B[0m"
53 changes: 0 additions & 53 deletions .github/workflows/code-coverage.yml

This file was deleted.

9 changes: 9 additions & 0 deletions .github/workflows/v1-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,12 @@ jobs:
OMISE_SKEY: skey_test_xxx
GOPATH: ${{ github.workspace }}
run: .github/scripts/test.sh

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
if: matrix.go == '1.21'
with:
projectBaseDir: ${{ env.WORKDIR }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sonar.projectKey=omise_omise-go
sonar.organization=omise
sonar.go.coverage.reportPaths=src/github.com/omise/omise-go/cover.out
sonar.go.coverage.reportPaths=cover.out
sonar.exclusions=internal/testutil/**
sonar.coverage.exclusions=**/*_test.go, /vendor/**, /testdata/**