name: Go

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    name: Go Build
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    steps:
    - name: Set up Go 1.x
      uses: actions/setup-go@v2
      with:
        go-version: '>= 1.20.4'
      id: go

    - name: Check out code into the Go module directory
      uses: actions/checkout@v3

    - name: Linters
      run: |
        go vet ./...

    - name: Test
      run: |
        go test ./...
