From 685a9d7611c9b0674f245597a392097e44d2e53c Mon Sep 17 00:00:00 2001 From: Arran Schlosberg Date: Fri, 14 Feb 2025 17:02:33 +0000 Subject: [PATCH] chore(ci): add `go` catch-all job --- .github/workflows/go.yml | 18 +++++++++--------- .github/workflows/lint.yml | 5 ++--- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index ad55ba24698..701fe6b4cd2 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -12,6 +12,14 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: + # If adding a new job, add it to the `needs` list of the `go` job as this is + # what gates PRs. + go: + runs-on: ubuntu-latest + needs: [go_test_short, go_test_tooling, go_generate, go_tidy] + steps: + - run: echo "Dependencies successful" + go_test_short: env: 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: - name: git diff run: git diff --exit-code - go_tidy_matrix: + go_tidy: runs-on: ubuntu-latest strategy: matrix: @@ -78,11 +86,3 @@ jobs: go-version-file: "${{ matrix.dir }}/go.mod" - run: go mod tidy - run: git diff --exit-code - - go_tidy: - # Each matrix instance runs as a different name, which doesn't play nicely - # with branch-protection rules. We instead require this job. - needs: go_tidy_matrix - runs-on: ubuntu-latest - steps: - - run: echo "Dependencies successful" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6dbaf7a08e6..053b5905710 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,8 +1,5 @@ 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: branches: [main, "release/**"] @@ -21,6 +18,8 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: + # 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. lint: runs-on: ubuntu-latest needs: [golangci-lint, yamllint, shellcheck]