Skip to content

Commit f994478

Browse files
authored
Add test coverage reporting and Codecov badge (#3055)
* Add codecov to ci * Add codecov to ci * update yanl * Add changes * Add changes * test * Add changes * Add changes * Add changes
1 parent 00d9848 commit f994478

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,9 @@ jobs:
3737

3838
- name: Test
3939
run: make test
40+
41+
- name: Upload to Codecov
42+
uses: codecov/codecov-action@v4
43+
with:
44+
files: coverage.txt
45+
token: ${{ secrets.CODECOV_TOKEN }}

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ test: testdeps
1414
go test ./... -short -race && \
1515
go test ./... -run=NONE -bench=. -benchmem && \
1616
env GOOS=linux GOARCH=386 go test && \
17+
go test -coverprofile=coverage.txt -covermode=atomic ./... && \
1718
go vet); \
1819
done
1920
cd internal/customvet && go build .

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![build workflow](https://github.com/redis/go-redis/actions/workflows/build.yml/badge.svg)](https://github.com/redis/go-redis/actions)
44
[![PkgGoDev](https://pkg.go.dev/badge/github.com/redis/go-redis/v9)](https://pkg.go.dev/github.com/redis/go-redis/v9?tab=doc)
55
[![Documentation](https://img.shields.io/badge/redis-documentation-informational)](https://redis.uptrace.dev/)
6+
[![codecov](https://codecov.io/github/redis/go-redis/graph/badge.svg?token=tsrCZKuSSw)](https://codecov.io/github/redis/go-redis)
67
[![Chat](https://discordapp.com/api/guilds/752070105847955518/widget.png)](https://discord.gg/rWtp5Aj)
78

89
> go-redis is brought to you by :star: [**uptrace/uptrace**](https://github.com/uptrace/uptrace).

0 commit comments

Comments
 (0)