.github/workflows/go-ci.yml
name: Go CI
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: 1.14
- name: Get dependencies
run: go get -v -t -d ./...
- name: Run tests and generate coverage report
run: go test -race -coverprofile cover.out -covermode atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1.0.7
with:
file: ./cover.out