name: Go
on: [push]
jobs:
  old-go:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/setup-go@v4
        with:
          go-version: 1.15
      - uses: actions/checkout@v3
      - run: go build

  test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [macos-latest, windows-latest, ubuntu-latest]
    steps:
      - uses: actions/setup-go@v4
        with:
          go-version: 1.20.1
      - uses: actions/checkout@v3
      - run: go test
