From 3369d2427c3a7862444f8f34f09aeed3526f1424 Mon Sep 17 00:00:00 2001 From: Simon Aronsson Date: Sun, 10 Jan 2021 16:39:45 +0100 Subject: [PATCH] chore(ci): add coverage upload --- .github/workflows/pull-request.yml | 6 +++++- .github/workflows/release.yml | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 5bdd01e..1f0ec4f 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -47,7 +47,11 @@ jobs: go-version: 1.15.x - name: Run tests run: | - go test ./... -coverprofile coverage.out + CGO_ENABLED=0 go test -v -coverprofile=coverage.out -covermode=atomic ./... + - name: Publish coverage + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} build: name: Build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b73616..4a83e1f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -147,6 +147,10 @@ jobs: needs: build runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Install mkdocs run: | pip install \