name: test

on:
  push:
    tags:
      - v*
    branches:
      - master
      - v*
  pull_request:

permissions:
  contents: read
  pull-requests: read

jobs:
  test:
    strategy:
      matrix:
        go-version: ['stable', 'oldstable']
        os: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-go@v5
      with:
        go-version: ${{ matrix.go-version }}
    - run: go test -race ./...
