on:
  pull_request:
    paths-ignore:
      - 'README.md'
      - 'CONTRIBUTING.md'
      - 'COPYING'
      - 'website/**'
      - '.github/*.md'
      - '.github/FUNDING.yml'

name: Validate Code
jobs:
  test:
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    defaults:
      run:
        working-directory: ${{ github.workspace }}/src
    steps:
    - name: Install Go
      uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
      with:
        go-version: 1.21
        cache-dependency-path: src/go.sum
    - name: Checkout code
      uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
    - name: Golang CI
      uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc
      with:
        working-directory: src
    - name: Unit Tests
      run: go test -v ./...
