name: go-test

on: [push, pull_request]

jobs:
  build:

    runs-on: ubuntu-20.04

    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-go@v2.1.5
      with:
        go-version: '1.16'

    - name: test
      run: go test ./... -coverprofile=profile.cov

    - uses: shogo82148/actions-goveralls@v1.5.1
      with:
        path-to-profile: profile.cov