From b869f36afb0783f07557007af1adba54438132a1 Mon Sep 17 00:00:00 2001 From: Arran Schlosberg Date: Thu, 12 Sep 2024 11:23:24 +0100 Subject: [PATCH 1/2] fix: run flaky upstream tests sequentially --- .github/workflows/go.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 62517d0699ab..fedbf5d3c19a 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -17,4 +17,7 @@ jobs: with: go-version: 1.21.4 - name: Run tests - run: go test -short $(go list ./... | grep -Pv 'go-ethereum/(accounts/keystore|eth/downloader|miner)$') + run: | # Upstream flakes are race conditions exacerbated by concurrent tests + FLAKY_REGEX='go-ethereum/(eth|accounts/keystore|eth/downloader|miner)$'; + go test -short $(go list ./... | grep -Pv "${FLAKY_REGEX}"); + go list ./... | grep -P "${FLAKY_REGEX}" | xargs -n 1 go test -short; From e0e6a7d8b8aecddebc53cb2d0edf092332ec5fc5 Mon Sep 17 00:00:00 2001 From: Arran Schlosberg Date: Thu, 12 Sep 2024 11:30:42 +0100 Subject: [PATCH 2/2] chore: run flaky tests first to fail early There are fewer of them so they'll fail quickly and allow the CI run to just be restarted. --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index fedbf5d3c19a..48f65609537e 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -19,5 +19,5 @@ jobs: - name: Run tests run: | # Upstream flakes are race conditions exacerbated by concurrent tests FLAKY_REGEX='go-ethereum/(eth|accounts/keystore|eth/downloader|miner)$'; - go test -short $(go list ./... | grep -Pv "${FLAKY_REGEX}"); go list ./... | grep -P "${FLAKY_REGEX}" | xargs -n 1 go test -short; + go test -short $(go list ./... | grep -Pv "${FLAKY_REGEX}");