2020-04-03 10:45:13 -05:00
|
|
|
name: Go
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
2020-04-03 11:09:49 -05:00
|
|
|
build_and_test:
|
|
|
|
name: Build and test
|
2020-04-03 10:45:13 -05:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
2020-04-03 11:09:49 -05:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
go: ['1.11', '1.12', '1.13', '1.14']
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- id: go
|
|
|
|
name: Set up Go
|
2020-04-03 10:45:13 -05:00
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
2020-04-03 11:19:40 -05:00
|
|
|
go-version: ${{ matrix.go }}
|
2020-04-03 10:45:13 -05:00
|
|
|
|
|
|
|
- name: Check out code into the Go module directory
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: go build -v .
|
|
|
|
|
|
|
|
- name: Test
|
2020-04-03 11:09:49 -05:00
|
|
|
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:
|
2020-04-03 11:19:40 -05:00
|
|
|
name: Finish
|
2020-04-03 11:13:23 -05:00
|
|
|
needs: build_and_test
|
2020-04-03 11:09:49 -05:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-04-03 11:13:23 -05:00
|
|
|
- uses: shogo82148/actions-goveralls@v1
|
|
|
|
with:
|
|
|
|
parallel-finished: true
|