name: Check GO

on:
  pull_request:
    branches:
      - main
    paths:
      - client/**
      - cmd/**
      - collectors/**
      - manager/**
      - protocol/**
      - .github/workflows/check-go.yml
  push:
    branches:
      - main

permissions:
  contents: read

jobs:
  golangci:
    name: lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/setup-go@v3
        with:
          go-version: "1.20"

      - uses: actions/checkout@v3

      - name: golangci-lint
        uses: golangci/golangci-lint-action@v3
        with:
          version: v1.51.2
