Skip to content

Commit

Permalink
ci: upload coverage to codecov (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
princjef authored Dec 8, 2021
1 parent 0713663 commit 070df04
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ jobs:
with:
version: latest
args: test
- name: Upload Coverage
if: ${{ matrix.platform == 'ubuntu-latest' }}
uses: codecov/codecov-action@v2
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/coverage.out
/coverage.txt
/gomarkdoc
/bin/
1 change: 1 addition & 0 deletions .gomarkdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ header: |+
[![Go Report Card](https://goreportcard.com/badge/github.com/princjef/gomarkdoc)](https://goreportcard.com/report/github.com/princjef/gomarkdoc)
[![GitHub Actions](https://github.com/princjef/gomarkdoc/workflows/Test/badge.svg)](https://github.com/princjef/gomarkdoc/actions?query=workflow%3ATest+branch%3Amaster)
[![Go Reference](https://pkg.go.dev/badge/github.com/princjef/gomarkdoc.svg)](https://pkg.go.dev/github.com/princjef/gomarkdoc)
[![codecov](https://codecov.io/gh/princjef/gomarkdoc/branch/master/graph/badge.svg?token=171XNH5XLT)](https://codecov.io/gh/princjef/gomarkdoc)
repository:
url: https://github.com/princjef/gomarkdoc
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![Go Report Card](https://goreportcard.com/badge/github.com/princjef/gomarkdoc)](https://goreportcard.com/report/github.com/princjef/gomarkdoc)
[![GitHub Actions](https://github.com/princjef/gomarkdoc/workflows/Test/badge.svg)](https://github.com/princjef/gomarkdoc/actions?query=workflow%3ATest+branch%3Amaster)
[![Go Reference](https://pkg.go.dev/badge/github.com/princjef/gomarkdoc.svg)](https://pkg.go.dev/github.com/princjef/gomarkdoc)
[![codecov](https://codecov.io/gh/princjef/gomarkdoc/branch/master/graph/badge.svg?token=171XNH5XLT)](https://codecov.io/gh/princjef/gomarkdoc)

# gomarkdoc

Expand Down
4 changes: 2 additions & 2 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ func DocVerify() error {
}

func Test() error {
return shellcmd.Command(`go test -coverprofile=coverage.out ./...`).Run()
return shellcmd.Command(`go test -coverprofile=coverage.txt ./...`).Run()
}

func Coverage() error {
return shellcmd.Command(`go tool cover -html=coverage.out`).Run()
return shellcmd.Command(`go tool cover -html=coverage.txt`).Run()
}

0 comments on commit 070df04

Please sign in to comment.