Skip to content

Commit f7a3a4f

Browse files
authored
chore(ci): add go catch-all job (#140)
## Why this should be merged New jobs are easily forgotten in the GitHub rules so we will only gate on `go` and have all others added as dependencies. ## How this works Same as #139 ## How this was tested Inspection of CI run: ![image](https://github.com/user-attachments/assets/f76ce720-a5ed-49e6-b000-265f3660ce8f)
1 parent bc42e5f commit f7a3a4f

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

.github/workflows/go.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ concurrency:
1212
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1313

1414
jobs:
15+
# If adding a new job, add it to the `needs` list of the `go` job as this is
16+
# what gates PRs.
17+
go:
18+
runs-on: ubuntu-latest
19+
needs: [go_test_short, go_test_tooling, go_generate, go_tidy]
20+
steps:
21+
- run: echo "Dependencies successful"
22+
1523
go_test_short:
1624
env:
1725
FLAKY_REGEX: "ava-labs/libevm/(triedb/pathdb|eth|eth/tracers/js|eth/tracers/logger|accounts/abi/bind|accounts/keystore|eth/downloader|miner|ethclient|ethclient/gethclient|eth/catalyst)$"
@@ -62,7 +70,7 @@ jobs:
6270
- name: git diff
6371
run: git diff --exit-code
6472

65-
go_tidy_matrix:
73+
go_tidy:
6674
runs-on: ubuntu-latest
6775
strategy:
6876
matrix:
@@ -78,11 +86,3 @@ jobs:
7886
go-version-file: "${{ matrix.dir }}/go.mod"
7987
- run: go mod tidy
8088
- run: git diff --exit-code
81-
82-
go_tidy:
83-
# Each matrix instance runs as a different name, which doesn't play nicely
84-
# with branch-protection rules. We instead require this job.
85-
needs: go_tidy_matrix
86-
runs-on: ubuntu-latest
87-
steps:
88-
- run: echo "Dependencies successful"

.github/workflows/lint.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: lint
22

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.
5-
63
on:
74
push:
85
branches: [main, "release/**"]
@@ -21,6 +18,8 @@ concurrency:
2118
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
2219

2320
jobs:
21+
# If adding a new linter: (a) create a new job; and (b) add it to the `needs`
22+
# list of the `lint` job as this is what gates PRs.
2423
lint:
2524
runs-on: ubuntu-latest
2625
needs: [golangci-lint, yamllint, shellcheck]

0 commit comments

Comments
 (0)