-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: report coverage to codeclimate (#113)
* ci: report coverage to codeclimate * ci: codeclimate: remove debug flag * ci: add codeclimate config file * ci/codeclimate: removed coverageLocations workaround paambaati/codeclimate-action#265 was fixed upstream
- Loading branch information
Roberto Santalla
authored
Dec 14, 2020
1 parent
c30461a
commit 40979ce
Showing
3 changed files
with
31 additions
and
3,161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: "2" | ||
plugins: | ||
golint: | ||
enabled: true | ||
config: | ||
min_confidence: 0.9 | ||
gofmt: | ||
enabled: true | ||
govet: | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,3 +94,24 @@ jobs: | |
- name: Scan code for vulnerabilities | ||
run: make ci/snyk-test | ||
|
||
coverage: | ||
name: Report coverage analysis to codeclimate | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
steps: | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{env.GO_VERSION}} | ||
- uses: actions/checkout@v2 | ||
- run: make compile-deps | ||
# go test outputs a fully qualified package path on the report, which confuses codeclimate if repo is not in $GOPATH | ||
- name: Set codeclimate prefix | ||
run: | | ||
echo "CC_PREFIX=$(go list -m)" >> $GITHUB_ENV | ||
- name: Test & publish code coverage | ||
uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: 286fd24e272c97116860791b9c4ed636092663dc665a6608c8aaa625e9c46b1b | ||
with: | ||
coverageCommand: go test -coverprofile=c.out ./... | ||
prefix: ${{ env.CC_PREFIX }} # CC will strip this from the test report, leading to the correct file path |
Oops, something went wrong.