name: Go
on:
  push:
    branches:
    - master
  pull_request:
    branches:
    - master
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-go@v5
      with:
        go-version: '>=1.17'
    - name: Build
      run: go build -v ./...
    - name: Test
      run: go test -race -count=1 ./...

  golangci:
    name: lint
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-go@v5
      with:
        go-version: '>=1.17'
    - name: golangci-lint
      uses: golangci/golangci-lint-action@v6
      continue-on-error: true
      with:
        version: latest
