name: Build and Test Client

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:

  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4

    - name: Set up Go
      uses: actions/setup-go@v5
      with:
        go-version: 1.25

    - name: Build
      run: go build -v ./client/...

    - name: Test
      run: go test -v ./client/...

    - name: Lint
      uses: golangci/golangci-lint-action@v6
      with:
        version: latest
        working-directory: ./client
        args: -E gofmt --max-same-issues 0
