diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d158570452d..f2bd4c237b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,17 +54,6 @@ jobs: echo >&2 "Reproducible build broken"; cat erigon1.sha256; cat erigon2.sha256; exit 1 fi - - name: Install golangci-lint - if: runner.os == 'Linux' - uses: golangci/golangci-lint-action@v6 - with: - version: v1.59.1 - args: --help - - - name: Lint - if: runner.os == 'Linux' - run: make lint - - name: Test run: make test diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000000..6647a7ad523 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,44 @@ +name: Lint +on: + push: + branches: + - main + - 'release/**' + pull_request: + branches: + - main + - 'release/**' + types: + - opened + - reopened + - synchronize + - ready_for_review + workflow_dispatch: + +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-go@v5 + with: + go-version: '1.22' + + - name: Install golangci-lint + if: runner.os == 'Linux' + uses: golangci/golangci-lint-action@v6 + with: + version: v1.59.1 + args: --help + + - name: Lint + if: runner.os == 'Linux' + run: make lint