From e695839823c0727460bcf905fda021bc49d59e30 Mon Sep 17 00:00:00 2001 From: Dmitry Shmulevich Date: Fri, 28 Feb 2025 15:51:56 -0800 Subject: [PATCH] enable codecov in GitHub CI Signed-off-by: Dmitry Shmulevich --- .github/workflows/go.yml | 10 +++++++++- README.md | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 45451c2..c275516 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -52,7 +52,15 @@ jobs: go-version: '1.23.2' - name: Test - run: go test -v ./... + run: go test -v -coverpkg=./... -coverprofile=coverage.out -covermode=atomic ./... + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage.out + fail_ci_if_error: true + verbose: true build: runs-on: ubuntu-latest diff --git a/README.md b/README.md index ac3f0f3..d17fdb4 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ # Topograph ![Build Status](https://github.com/NVIDIA/topograph/actions/workflows/go.yml/badge.svg) +![Codecov](https://codecov.io/gh/NVIDIA/topograph/branch/main/graph/badge.svg) ![Static Badge](https://img.shields.io/badge/license-Apache_2.0-green) Topograph is a component designed to expose the underlying physical network topology of a cluster to enable a workload manager make network-topology aware scheduling decisions.