summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Steinert <[email protected]>2023-11-29 21:59:13 -0600
committerGitHub <[email protected]>2023-11-29 21:59:13 -0600
commit6339228bcdc48667ad0accffd1d7bb0efcc927fe (patch)
tree1836e52da472f660c05df6fe906324589a42a9fd
parentfb46dfb9da51524eb8d5a5b281d2f245551e0585 (diff)
parent004c7008f4c64b16a4177d9d6630bc607d9f40e1 (diff)
Merge pull request #19 from msteinert/codecov
Another try at adding codecov
-rw-r--r--.github/workflows/codecov.yaml4
-rw-r--r--.github/workflows/test.yaml6
-rw-r--r--.gitignore1
-rw-r--r--README.md1
4 files changed, 7 insertions, 5 deletions
diff --git a/.github/workflows/codecov.yaml b/.github/workflows/codecov.yaml
deleted file mode 100644
index e420c7d..0000000
--- a/.github/workflows/codecov.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
-- name: Upload coverage reports to Codecov
- uses: codecov/codecov-action@v3
- env:
- CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 23b3b64..1a296fa 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -19,4 +19,8 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Test
- run: sudo go test -v ./...
+ run: sudo go test -v -cover -coverprofile=coverage.out ./...
+ - name: Upload coverage reports to Codecov
+ uses: codecov/codecov-action@v3
+ env:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2d83068
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+coverage.out
diff --git a/README.md b/README.md
index deb946b..f35d516 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
[![GoDoc](https://godoc.org/github.com/msteinert/pam?status.svg)](http://godoc.org/github.com/msteinert/pam)
+[![codecov](https://codecov.io/gh/msteinert/pam/graph/badge.svg?token=L1K3UTB065)](https://codecov.io/gh/msteinert/pam)
[![Go Report Card](https://goreportcard.com/badge/github.com/msteinert/pam)](https://goreportcard.com/report/github.com/msteinert/pam)
# Go PAM