name: go-test

on: [push, pull_request]

jobs:
  build:

    runs-on: ubuntu-20.04

    steps:
    - uses: actions/checkout@v3
    - uses: actions/setup-go@v4.0.0
      with:
        go-version: '1.18'

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

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