Skip to content

Commit

Permalink
ci: Split lint from test CI (#12139)
Browse files Browse the repository at this point in the history
Better separation between testing and linting. Failed test CI only goes
red for failed tests.
  • Loading branch information
shohamc1 authored Oct 1, 2024
1 parent 43dcfba commit 9c10433
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 11 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9c10433

Please sign in to comment.