diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9537a2ca..9cbc9be7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,14 @@ jobs: run: make helm-lint - name: Test run: make test + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4 + with: + files: ./coverage.out + fail_ci_if_error: true + verbose: true + token: ${{ secrets.CODECOV_TOKEN }} + slug: linode/linode-cloud-controller-manager - name: Build run: make build docker-build: diff --git a/Makefile b/Makefile index 2c029a6e..5da89db0 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ fmt: .PHONY: test # we say code is not worth testing unless it's formatted test: fmt codegen - go test -v -cover ./cloud/... $(TEST_ARGS) + go test -v -cover -coverprofile ./coverage.out ./cloud/... $(TEST_ARGS) .PHONY: build-linux build-linux: codegen diff --git a/README.md b/README.md index 5c2987f9..69380bd8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Go Report Card](https://goreportcard.com/badge/github.com/linode/linode-cloud-controller-manager)](https://goreportcard.com/report/github.com/linode/linode-cloud-controller-manager) [![Continuous Integration](https://github.com/linode/linode-cloud-controller-manager/actions/workflows/ci.yml/badge.svg)](https://github.com/linode/linode-cloud-controller-manager/actions/workflows/ci.yml) -[![Coverage Status](https://coveralls.io/repos/github/linode/linode-cloud-controller-manager/badge.svg?branch=master)](https://coveralls.io/github/linode/linode-cloud-controller-manager?branch=master) +[![codecov](https://codecov.io/gh/linode/linode-cloud-controller-manager/graph/badge.svg?token=GSRnqHUmCk)](https://codecov.io/gh/linode/linode-cloud-controller-manager) [![Docker Pulls](https://img.shields.io/docker/pulls/linode/linode-cloud-controller-manager.svg)](https://hub.docker.com/r/linode/linode-cloud-controller-manager/) [![Twitter](https://img.shields.io/twitter/follow/linode.svg?style=social&logo=twitter&label=Follow)](https://twitter.com/intent/follow?screen_name=linode)