diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bef06284..5007423a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,3 +37,9 @@ jobs: - name: Test run: make test + + - name: Upload to Codecov + uses: codecov/codecov-action@v4 + with: + files: coverage.txt + token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/Makefile b/Makefile index d8d00759..1a6bd178 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,7 @@ test: testdeps go test ./... -short -race && \ go test ./... -run=NONE -bench=. -benchmem && \ env GOOS=linux GOARCH=386 go test && \ + go test -coverprofile=coverage.txt -covermode=atomic ./... && \ go vet); \ done cd internal/customvet && go build . diff --git a/README.md b/README.md index e7df5dfd..c7951a4d 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![build workflow](https://github.com/redis/go-redis/actions/workflows/build.yml/badge.svg)](https://github.com/redis/go-redis/actions) [![PkgGoDev](https://pkg.go.dev/badge/github.com/redis/go-redis/v9)](https://pkg.go.dev/github.com/redis/go-redis/v9?tab=doc) [![Documentation](https://img.shields.io/badge/redis-documentation-informational)](https://redis.uptrace.dev/) +[![codecov](https://codecov.io/github/redis/go-redis/graph/badge.svg?token=tsrCZKuSSw)](https://codecov.io/github/redis/go-redis) [![Chat](https://discordapp.com/api/guilds/752070105847955518/widget.png)](https://discord.gg/rWtp5Aj) > go-redis is brought to you by :star: [**uptrace/uptrace**](https://github.com/uptrace/uptrace).