bob/.github/workflows/coverage.yml

27 lines
545 B
YAML
Raw Normal View History

2021-06-24 07:43:28 +00:00
name: Test and coverage
on: [push, pull_request]
jobs:
2021-12-10 09:50:35 +00:00
check:
name: Check
2021-06-24 07:43:28 +00:00
runs-on: ubuntu-latest
2021-12-10 09:50:35 +00:00
needs: build
2021-06-24 07:43:28 +00:00
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
2021-11-05 05:06:47 +00:00
go-version: 1.17.x
2021-06-24 07:43:28 +00:00
2021-12-10 09:50:35 +00:00
- name: Vet check
run: go vet -v
2021-06-24 07:43:28 +00:00
- name: Run coverage
run: go test -v -race -coverprofile=coverage.out -covermode=atomic -failfast
- name: Upload coverage to Codecov
2021-12-10 09:50:35 +00:00
uses: codecov/codecov-action@v1