From 55729a19881b22ce99ad03f796de51c75bbc2a1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20K=C3=A4ldstr=C3=B6m?= Date: Wed, 29 Jul 2020 17:13:47 +0300 Subject: [PATCH] Add codecov to Github Actions --- .github/workflows/build.yaml | 4 ++++ .gitignore | 1 + Makefile | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 81fcd437..48a38c99 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -25,6 +25,10 @@ jobs: go-version: 1.14.x - name: Run tests run: make test + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + file: ./coverage.txt - name: Check if working tree is dirty run: | if [[ $(git diff --stat) != '' ]]; then diff --git a/.gitignore b/.gitignore index 66fd13c9..e560bfa5 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ # Output of the go coverage tool, specifically when used with LiteIDE *.out +coverage.txt # Dependency directories (remove the comment below to include it) # vendor/ diff --git a/Makefile b/Makefile index debffbcb..2b6d724b 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ vet: go vet ./... test: tidy fmt vet - go test ./... -coverprofile cover.out + go test -race -coverprofile=coverage.txt -covermode=atomic ./... release: git checkout master