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

38 lines
646 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.17', '1.18', '1.19']
2020-04-03 11:09:49 -05:00
steps:
- id: go
name: Set up Go
uses: actions/setup-go@v3
2020-04-03 10:45:13 -05:00
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
uses: actions/checkout@v3
2020-04-03 10:45:13 -05:00
- 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:33:48 -05:00
run: bash <(curl -s https://codecov.io/bash) -f profile.cov