.github/workflows/go.yml
name: Go
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
id: go
- uses: actions/checkout@v2
- run: |
go get -v -t -d ./...
- run: go test -v .
- run: go test -race -coverprofile=coverage.txt -covermode=atomic
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.txt