name: Go
on: [push]
jobs:

  test:

    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        os: [macos-latest, windows-latest, ubuntu-latest]

    steps:

    - uses: actions/setup-go@v2
      with:
        go-version: 1.16

    - uses: actions/checkout@v2

    - name: lint
      run: go install github.com/ysmood/golangci-lint@latest && golangci-lint
      if: matrix.os == 'ubuntu-latest'

    - name: test
      run: |
        go generate
        go test
