Skip to content

Commit

Permalink
ci: upload coverage to codeclimate
Browse files Browse the repository at this point in the history
  • Loading branch information
ucpr committed Dec 28, 2023
1 parent 95f3828 commit 8cdc2a4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,22 @@ jobs:
go mod verify
- name: Test
run: make test
run: make FLAGS="-coverprofile=coverage.out" test

- name: Build
run: make build

- uses: jandelgado/[email protected]
with:
infile: coverage.out
outfile: coverage.lcov
version: v1.0.6

- name: Report coverage to CodeClimate
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageLocations: |
${{github.workspace}}/coverage.lcov:lcov
verifyDownload: true
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ build:

.PHONY: test
test: PKG ?= ./...
test: FLAGS ?=
test:
$(GO) test -race $(PKG)
$(GO) test -race $(PKG) $(FLAGS)

.PHONY: integration-test
integration-test: PKG ?= ./...
Expand Down

0 comments on commit 8cdc2a4

Please sign in to comment.