name: Go

on:
  push:
    branches: [ main ]
    paths-ignore:
      - '**.md'
  pull_request:
    branches: [ main ]
    paths-ignore:
      - '**.md'

jobs:

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

    - name: Set up Go
      uses: actions/setup-go@v5
      with:
        go-version: '^1.22.0'

    - name: Build
      run: go build -v ./...
      working-directory: .

    - name: Test
      run: go test -v ./...
      working-directory: .