name: Lint

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

jobs:
  golangci-lint:
    name: Go Lint
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Setup Go
        uses: actions/setup-go@v5
        with:
          go-version: "1.25"
          cache: true

      - name: Install dependencies
        run: go mod download

      - name: Tidy modules
        run: go mod tidy

      - name: Run golangci-lint
        uses: https://github.com/golangci/golangci-lint-action@v6
        with:
          version: latest
          args: --timeout=5m ./...
