From 09c29984082dbe39c1419283b5ae5b1e4f3f6833 Mon Sep 17 00:00:00 2001 From: Lukas Herman Date: Thu, 1 Oct 2020 22:25:32 -0700 Subject: [PATCH] Add code coverage report --- .github/workflows/ci.yaml | 4 +++- codecov.yml | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 codecov.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 83fdd8e4..47bae7b8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,7 +38,9 @@ jobs: env: CGO_ENABLED: 0 - name: go test - run: go test -tags nolibopusfile ./... -v -race + run: go test -tags nolibopusfile ./... -v -race -coverprofile=coverage.txt -covermode=atomic + - uses: codecov/codecov-action@v1 + if: matrix.go == '1.15' - name: go test without CGO run: go test . pkg/... -v env: diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..8a630dcb --- /dev/null +++ b/codecov.yml @@ -0,0 +1,10 @@ +coverage: + status: + project: + default: + # Allow decreasing 2% of total coverage to avoid noise. + threshold: 2% + patch: off + +ignore: + - "examples/*"