diff --git a/.github/.codecov.yml b/.github/.codecov.yml new file mode 100644 index 000000000..50108b145 --- /dev/null +++ b/.github/.codecov.yml @@ -0,0 +1,5 @@ +comment: false +coverage: + status: + project: + default: false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9bd3a0b5e..f6483493c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,3 +83,10 @@ jobs: - name: Run tests run: make test + - + name: Upload code coverage report + # TODO: Switch to "v1" when https://github.com/codecov/codecov-action/issues/100 is addressed + uses: codecov/codecov-action@v1.0.11 + with: + file: coverage.txt + env_vars: "GOOS,GOARCH" diff --git a/.gitignore b/.gitignore index 5cb6357e3..3414c0d41 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ dist/ .idea/ +coverage.txt diff --git a/Makefile b/Makefile index a08a17ae9..64c53b54d 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,6 @@ fmt: go run github.com/mh-cbon/go-fmt-fail ./... test: - go test -v -cover ./... + go test -v -coverprofile=coverage.txt -covermode=atomic ./... .PHONY: fmt test