From 9f411e097cec9f2215a3784437d8aea0385b6a2e Mon Sep 17 00:00:00 2001 From: Brad Van Vugt <1531419+bvanvugt@users.noreply.github.com> Date: Fri, 3 Jan 2020 11:49:25 -0800 Subject: [PATCH] Add Codecov to CI Pipeline --- .github/workflows/ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a953558..cdd79cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: run: | curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.22.2 ./bin/golangci-lint run -v ./... - + test: name: Test (go test) runs-on: ubuntu-latest @@ -39,4 +39,10 @@ jobs: with: go-version: '1.13' - name: go test - run: go test ./... + run: go test -race -coverprofile=coverage.txt ./... + - name: upload to codecov + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./coverage.txt + fail_ci_if_error: true