Skip to content

Commit fee55ce

Browse files
committed
chore: measure code coverage
1 parent 0526b37 commit fee55ce

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

.github/workflows/build-test.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ jobs:
6868
with:
6969
version: "latest"
7070
args: "test:unit"
71+
- name: "Upload coverage reports to Codecov"
72+
uses: "codecov/codecov-action@v5"
73+
with:
74+
token: ${{ secrets.CODECOV_TOKEN }}
7175

7276
e2e:
7377
name: "e2e Tests"

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# spicedb-kubeapi-proxy
22

3+
<a href="https://app.codecov.io/gh/authzed/spicedb-kubeapi-proxy"><img alt="coverage" src="https://img.shields.io/codecov/c/github/authzed/spicedb-kubeapi-proxy"></a>
4+
35
`spicedb-kubeapi-proxy` is a proxy that runs in between clients and the kube
46
apiserver that can authorize requests and filter responses using an embedded or
57
remote SpiceDB.

magefiles/test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ func (t Test) All() error {
1818

1919
// Unit runs the unit tests.
2020
func (Test) Unit() error {
21-
return RunSh("go", WithV())("test", "./...")
21+
// TODO add -race
22+
return RunSh("go", WithV())("test", "-count=1", "-coverpkg=./...", "-covermode=atomic", "-coverprofile=coverage.txt", "./...")
2223
}
2324

2425
// E2e runs the end-to-end tests against a real apiserver.

0 commit comments

Comments
 (0)