Skip to content

Commit 97116b6

Browse files
authored
adds test coverage reports for PRs fixes test coverage bug in logger tests (#1684)
adds coveral and codecov in pipline and fixes coverage with logger tests Signed-off-by: ChrisJBurns <[email protected]>
1 parent 46a66f5 commit 97116b6

File tree

3 files changed

+87
-348
lines changed

3 files changed

+87
-348
lines changed

.github/workflows/test.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,17 @@ jobs:
3131
version: 3.x
3232
repo-token: ${{ secrets.GITHUB_TOKEN }}
3333

34-
- name: Run tests
35-
run: task test
34+
- name: Run tests with coverage
35+
run: task test-coverage
36+
37+
- name: Upload coverage reports to Codecov with GitHub Action
38+
uses: codecov/codecov-action@v5
39+
env:
40+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
41+
with:
42+
slug: stacklok/toolhive
43+
44+
- name: Upload coverage to Coveralls
45+
uses: coverallsapp/github-action@v2
46+
with:
47+
file: coverage/coverage.out

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
</p>
1313

1414
[![Release][release-img]][release] [![Build status][ci-img]][ci]
15+
[![Coverage Status][coveralls-img]][coveralls]
1516
[![License: Apache 2.0][license-img]][license]
1617
[![Star on GitHub][stars-img]][stars] [![Discord][discord-img]][discord]
1718

@@ -104,6 +105,8 @@ This project is licensed under the [Apache 2.0 License](./LICENSE).
104105
[release]: https://github.com/stacklok/toolhive/releases/latest
105106
[ci-img]: https://img.shields.io/github/actions/workflow/status/stacklok/toolhive/run-on-main.yml?style=flat&logo=github&label=Build
106107
[ci]: https://github.com/stacklok/toolhive/actions/workflows/run-on-main.yml
108+
[coveralls-img]: https://coveralls.io/repos/github/stacklok/toolhive/badge.svg?branch=main
109+
[coveralls]: https://coveralls.io/github/stacklok/toolhive?branch=main
107110
[license-img]: https://img.shields.io/badge/License-Apache2.0-blue.svg?style=flat
108111
[license]: https://opensource.org/licenses/Apache-2.0
109112
[stars-img]: https://img.shields.io/github/stars/stacklok/toolhive.svg?style=flat&logo=github&label=Stars

0 commit comments

Comments
 (0)