Skip to content

Commit bc42e5f

Browse files
authored
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: ![image](https://github.com/user-attachments/assets/9454ca35-8a7f-4393-bdd8-5029cfaaf7e6) ![image](https://github.com/user-attachments/assets/e92b964d-5a64-415d-b8a3-1e9c84af3060)
1 parent 00c10cf commit bc42e5f

File tree

4 files changed

+27
-48
lines changed

4 files changed

+27
-48
lines changed

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,4 @@ jobs:
8585
needs: go_tidy_matrix
8686
runs-on: ubuntu-latest
8787
steps:
88-
- run: echo "I'm a no-op"
88+
- run: echo "Dependencies successful"

.github/workflows/golangci-lint.yml renamed to .github/workflows/lint.yml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
name: golangci-lint
1+
name: lint
2+
3+
# If adding a new linter: (a) create a new job; and (b) add it to the `needs`
4+
# list of the `lint` job as this is what gates PRs.
25

36
on:
47
push:
@@ -18,8 +21,13 @@ concurrency:
1821
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1922

2023
jobs:
21-
golangci:
22-
name: lint
24+
lint:
25+
runs-on: ubuntu-latest
26+
needs: [golangci-lint, yamllint, shellcheck]
27+
steps:
28+
- run: echo "Dependencies successful"
29+
30+
golangci-lint:
2331
runs-on: ubuntu-latest
2432
steps:
2533
- uses: actions/checkout@v4
@@ -40,3 +48,18 @@ jobs:
4048
uses: golangci/golangci-lint-action@v6
4149
with:
4250
version: v1.60
51+
52+
yamllint:
53+
runs-on: ubuntu-latest
54+
steps:
55+
- uses: actions/checkout@v4
56+
- run: yamllint -c .yamllint.yml .
57+
58+
shellcheck:
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v4
62+
- name: Run ShellCheck
63+
uses: ludeeus/[email protected]
64+
with:
65+
scandir: './libevm'

.github/workflows/shellcheck.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/yml.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)