name: Build

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

jobs:
  build:
    runs-on: ubuntu-22.04
    steps:
      - name: Checkout
        uses: actions/checkout@v3

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

      - name: Build
        run: make build

      - name: Test
        run: make test

      - name: Vet
        run: make vet

      - name: Format check
        run: |
          make fmt
          git diff --exit-code
