name: Test

on: [push, pull_request]
permissions:
  contents: read
jobs:
  test:
    strategy:
      matrix:
        go-version: [1.16.x, 1.17.x, 1.18.x, 1.19.x,1.20.x,1.21.x,1.22.x,1.23.x,1.24.x]
        os: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
    - name: Install Go
      uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c #v6.1.0
      with:
        go-version: ${{ matrix.go-version }}
    - name: Checkout code
      uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 #v4.0.0
    - name: Test
      run: go test ./...
