name: golangci-lint
on:
  push:
  pull_request:
permissions:
  contents: read
  # Optional: allow read access to pull request. Use with `only-new-issues` option.
  pull-requests: read

jobs:
  golangci:
    name: lint
    runs-on: depot-ubuntu-22.04-4
    strategy:
      matrix:
        working-directory: ['.', 'modules/light-clients/08-wasm', 'e2e']
    steps:
      - uses: actions/setup-go@v5
        with:
          go-version: '1.23'
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: golangci-lint
        uses: golangci/golangci-lint-action@v8.0.0
        with:
          version: v2.1
          only-new-issues: true
          args: --timeout 10m
          working-directory: ${{ matrix.working-directory }}
