mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-20 13:44:31 +00:00
chore(ci): consolidate linters (#139)
## Why this should be merged Branch-protection rules only require the Go linter (erroneously called `lint`) by mistake. All linters are now dependencies of a single `lint` job that remains as a PR gate. New linters will now be enforced by default. Closes #138 ## How this works GitHub Actions `need` configuration. The path limitation of running `yamllint` is removed because it's such a cheap job so is ok to always run. ## How this was tested Inspection of CI run and PR's required jobs:  
This commit is contained in:
parent
00c10cf539
commit
bc42e5f29c
4 changed files with 27 additions and 48 deletions
2
.github/workflows/go.yml
vendored
2
.github/workflows/go.yml
vendored
|
|
@ -85,4 +85,4 @@ jobs:
|
|||
needs: go_tidy_matrix
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo "I'm a no-op"
|
||||
- run: echo "Dependencies successful"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
name: golangci-lint
|
||||
name: lint
|
||||
|
||||
# If adding a new linter: (a) create a new job; and (b) add it to the `needs`
|
||||
# list of the `lint` job as this is what gates PRs.
|
||||
|
||||
on:
|
||||
push:
|
||||
|
|
@ -18,8 +21,13 @@ concurrency:
|
|||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||
|
||||
jobs:
|
||||
golangci:
|
||||
name: lint
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [golangci-lint, yamllint, shellcheck]
|
||||
steps:
|
||||
- run: echo "Dependencies successful"
|
||||
|
||||
golangci-lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
|
@ -40,3 +48,18 @@ jobs:
|
|||
uses: golangci/golangci-lint-action@v6
|
||||
with:
|
||||
version: v1.60
|
||||
|
||||
yamllint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: yamllint -c .yamllint.yml .
|
||||
|
||||
shellcheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Run ShellCheck
|
||||
uses: ludeeus/action-shellcheck@2.0.0
|
||||
with:
|
||||
scandir: './libevm'
|
||||
22
.github/workflows/shellcheck.yml
vendored
22
.github/workflows/shellcheck.yml
vendored
|
|
@ -1,22 +0,0 @@
|
|||
name: shellcheck
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, "release/**"]
|
||||
pull_request:
|
||||
branches: [main, "release/**"]
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||
|
||||
jobs:
|
||||
shellcheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Run ShellCheck
|
||||
uses: ludeeus/action-shellcheck@2.0.0
|
||||
with:
|
||||
scandir: './libevm'
|
||||
22
.github/workflows/yml.yml
vendored
22
.github/workflows/yml.yml
vendored
|
|
@ -1,22 +0,0 @@
|
|||
name: YAML check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "**/*.yml"
|
||||
- "**/*.yaml"
|
||||
- ".github/workflows/yml.yml"
|
||||
- ".github/yamllint.yml"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||
|
||||
jobs:
|
||||
yaml-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Validate YAML files
|
||||
run: yamllint -c .yamllint.yml .
|
||||
Loading…
Reference in a new issue