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