Skip to content

Commit

Permalink
Measure code coverage during tests (#39)
Browse files Browse the repository at this point in the history
* Generate coverage when running tests

* Upload coverage to Codecov

* Update Codecov instructions
  • Loading branch information
Acconut authored Dec 9, 2024
1 parent 748e12d commit 830730d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,10 @@ jobs:
env:
TRANSLOADIT_KEY: ${{ secrets.TRANSLOADIT_KEY }}
TRANSLOADIT_SECRET: ${{ secrets.TRANSLOADIT_SECRET }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
files: ./coverage.out
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ test-examples:
cd ./examples && find . -type f | xargs -i sh -c "go build {} && go clean" \;

test-package:
go test -v .
go test -v -coverprofile=coverage.out -covermode=atomic .

test: test-package test-examples

Expand Down

0 comments on commit 830730d

Please sign in to comment.