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 62dc5b8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@ jobs:
go mod verify
- name: Test
run: make test
run: make FLAGS="-coverprofile=coverage.out" test

- name: Build
run: make build

- name: Report coverage to CodeClimate
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageLocations: |
${{github.workspace}}/*.out:gcov
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 62dc5b8

Please sign in to comment.