Skip to content

Commit

Permalink
build: push code coverage to codecov 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
robertrossmann committed Feb 22, 2024
1 parent de6df5d commit 801a6c8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@ jobs:
with:
go-version-file: go.mod
- run: go version
- run: go test -v ./...
- run: make test
- name: Upload coverage reports to Codecov
if: success()
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@

*.log
.cache
coverage.txt
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ lint: force
./tools/golangci-lint run -v

test: force
go test -v -timeout 5s ./...
go test -v -timeout 5s -covermode=atomic -coverprofile=coverage.txt ./...

clean:
rm -rf .cache
Expand Down
7 changes: 7 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# `go.strv.io/background`

[![Tests][badge-tests]][workflow-tests] [![codecov][badge-codecov]][codecov-dashboard]

> A package that keeps track of goroutines and allows you to wait for them to finish when it's time to shut down your application.
## Purpose
Expand Down Expand Up @@ -62,3 +64,8 @@ func main() {
## License

See the [LICENSE](LICENSE) file for details.

[badge-tests]: https://github.com/strvcom/strv-backend-go-background/actions/workflows/test.yaml/badge.svg
[workflow-tests]: https://github.com/strvcom/strv-backend-go-background/actions/workflows/test.yaml
[badge-codecov]: https://codecov.io/gh/strvcom/strv-backend-go-background/graph/badge.svg?token=ST3JD5GCRN
[codecov-dashboard]: https://codecov.io/gh/strvcom/strv-backend-go-background

0 comments on commit 801a6c8

Please sign in to comment.