Skip to content

Commit

Permalink
Merge pull request #5 from go-vela/goveralls
Browse files Browse the repository at this point in the history
Use goveralls to report test coverage to coveralls
  • Loading branch information
Neal authored Nov 6, 2019
2 parents 1afbfcf + a1b70eb commit 38631b2
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,18 @@ jobs:
container:
image: golang:latest
steps:

- name: clone
uses: actions/checkout@v1
- name: Calc coverage
uses: actions/checkout@v1

- name: install
run: |
export PATH=$PATH:$(go env GOPATH)/bin
go test -v -covermode=count -coverprofile=coverage.out
- name: Convert coverage to lcov
uses: jandelgado/gcov2lcov-action@v1.0.0
with:
infile: coverage.out
outfile: coverage.lcov
go get github.com/mattn/goveralls
- name: Coveralls
uses: coverallsapp/github-action@v1.0.1
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov
- name: test
run: |
go test -covermode=count -coverprofile=coverage.out ./...
- name: coveralls
run: |
# https://github.com/mattn/goveralls#goveralls
$GOPATH/bin/goveralls -service=actions -coverprofile=coverage.out -repotoken=${{ secrets.COVERALLS_TOKEN }}

0 comments on commit 38631b2

Please sign in to comment.