name: CI

on:
  push:
    branches-ignore:
      - 'orig'
  pull_request:
    branches-ignore:
      - 'orig'

jobs:
  test:
    strategy:
      matrix:
        go: ['1.20','1.19','1.18']
        platform: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.platform }}

    steps:
    - name: Set up Go
      uses: actions/setup-go@v4
      with:
        go-version: ${{ matrix.go }}
        check-latest: true
    - run: go version
    
    - uses: actions/checkout@v3
    - name: Test
      run: go test -v -cover .
