name: golang

on:
  pull_request:
  push:
    branches:
      - main

concurrency:
  group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}'
  cancel-in-progress: true

jobs:
  build-and-test:
    runs-on: ubuntu-latest
    steps:
      - name: Git Checkout
        uses: actions/checkout@v5
      - name: Set up Go tooling
        uses: actions/setup-go@v6
        with:
          go-version-file: go.mod
      - name: Build
        run: make build
      - name: Test
        run: make test
  lint:
    runs-on: ubuntu-latest
    steps:
      - name: Git Checkout
        uses: actions/checkout@v5
      - name: Set up Go tooling
        uses: actions/setup-go@v6
        with:
          go-version-file: go.mod
      - name: Lint
        run: make lint
