Skip to content

Commit

Permalink
ci(test): Visualize code coverage (#109)
Browse files Browse the repository at this point in the history
Upload to Codecov and add comments to PRs.
  • Loading branch information
5ouma committed Jun 14, 2024
1 parent 36cd24f commit d9734f1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
[![Test](https://img.shields.io/github/actions/workflow/status/5ouma/mli/test.yml?label=test&style=flat-square)](https://github.com/5ouma/mli/actions/workflows/test.yml)
[![Release](https://img.shields.io/github/actions/workflow/status/5ouma/mli/release.yml?label=release&style=flat-square)](https://github.com/5ouma/mli/actions/workflows/release.yml)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/5ouma/mli/main.svg?style=flat-square)](https://results.pre-commit.ci/latest/github/5ouma/mli/main)
[![codecov](https://codecov.io/gh/5ouma/mli/graph/badge.svg?token=GHN8H6W1LZ)](https://codecov.io/gh/5ouma/mli)

</div>

Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,10 @@ jobs:
- name: 📊 Static Analysis
run: go vet -v ./...

- name: 🧪 Test Packages
run: go test -v -race ./...
- name: 🧪 Run Tests
run: go test -v -race ./... -coverprofile=coverage.txt -covermode=atomic

- name: ☂️ Upload Coverage
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
mli
dist/
/mli
/dist/
/coverage.txt

0 comments on commit d9734f1

Please sign in to comment.