name: golangci-lint

on:
  push:
    branches:
      - develop
  pull_request:
    types: [opened, reopened, synchronize]

jobs:
  golangci:
    name: lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: '0'
      - name: Set Up Go
        uses: actions/setup-go@v5
        with:
          go-version-file: go.mod
          check-latest: true
      - name: golangci-lint
        uses: golangci/golangci-lint-action@v7
        with:
          version: v2.1
          args: -v
