Skip to content

Commit 953fca3

Browse files
committed
Add coverage report by Codecov
This is needed to display coverage, and as an example of setting up coverage counts. Also, added badges to make the repositories look prettier.
1 parent cfe9add commit 953fca3

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.github/workflows/go.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ jobs:
3434
- name: Teardown test environment
3535
run: make test-env-up
3636

37+
- name: Upload coverage reports to Codecov
38+
uses: codecov/codecov-action@v3
39+
env:
40+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
41+
3742
golangci:
3843
name: lint
3944
runs-on: ubuntu-latest

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Example of testing Go code with Postgres
22

3+
[![Go workflow status badge](https://github.com/xorcare/testing-go-code-with-postgres/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/xorcare/testing-go-code-with-postgres/actions/workflows/go.yml)
4+
[![codecov](https://codecov.io/github/xorcare/testing-go-code-with-postgres/branch/main/graph/badge.svg?token=AmPmVHf2ej)](https://codecov.io/github/xorcare/testing-go-code-with-postgres/tree/main)
5+
[![Go Report Card](https://goreportcard.com/badge/github.com/xorcare/testing-go-code-with-postgres)](https://goreportcard.com/report/github.com/xorcare/testing-go-code-with-postgres)
6+
7+
38
The example suggests a solution to the problem of cleaning the database after
49
running tests and the problem of running tests in parallel. It also shows how
510
to organize integration testing of Go code with Postgres.

0 commit comments

Comments
 (0)