go-arg/.github/workflows/go.yml

50 lines
914 B
YAML
Raw Normal View History

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
2020-04-17 15:26:49 -05:00
- name: Checkout
2020-04-03 10:45:13 -05:00
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
2020-04-17 15:26:49 -05:00
run: bash <(curl -s https://codecov.io/bash)
2020-04-03 11:09:49 -05:00
with:
2020-04-17 15:26:49 -05:00
file: ./profile.cov
2020-04-03 11:09:49 -05:00
# 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