name: Go
on: [push]
jobs:
  test:
    runs-on: ${{ matrix.os }}

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

    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-go@v5
        with:
          go-version: 1.22

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

      - name: test
        run: |
          go generate
          go test
