add coverage using goveralls

This commit is contained in:
Alex Flint 2020-04-03 12:09:49 -04:00
parent 7ac7956369
commit ce896f3df9
1 changed files with 27 additions and 7 deletions

View File

@ -8,16 +8,21 @@ on:
jobs:
build:
name: Build
build_and_test:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
strategy:
fail-fast: false
matrix:
go: ['1.11', '1.12', '1.13', '1.14']
steps:
- id: go
name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
go-version: 1.13 # ${{ matrix.go }}
- name: Check out code into the Go module directory
uses: actions/checkout@v2
@ -26,4 +31,19 @@ jobs:
run: go build -v .
- name: Test
run: go test -v .
run: go test -v -coverprofile=profile.cov .
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov
parallel: true
# notifies coveralls that all test jobs are finished
finish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: shogo82148/actions-goveralls@v1
with:
parallel-finished: true