From 458f64dda9eb4a02282dc99c010f05c080c3ade2 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Tue, 1 Dec 2026 20:35:43 -0800 Subject: [PATCH] ci: resolve evidence directory only after runner allocation --- seaweed-block/.github/workflows/test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/seaweed-block/.github/workflows/test.yml b/seaweed-block/.github/workflows/test.yml index e18f7752bb..5e1591c52a 100644 --- a/seaweed-block/.github/workflows/test.yml +++ b/seaweed-block/.github/workflows/test.yml @@ -46,7 +46,6 @@ jobs: # Pure-Go build: no package in the default build needs cgo, and the # hosted runner should not depend on a C toolchain being present. CGO_ENABLED: "0" - CI_EVIDENCE_DIR: ${{ runner.temp }}/ci-${{ matrix.suite }}-${{ github.run_id }}-${{ github.run_attempt }} steps: - name: Checkout uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 @@ -61,7 +60,10 @@ jobs: # installation or privileged reads. A job-sized lifetime also bounds # the sampler if cancellation prevents the stop step. continue-on-error: true + env: + CI_EVIDENCE_DIR: ${{ runner.temp }}/ci-${{ matrix.suite }}-${{ github.run_id }}-${{ github.run_attempt }} run: | + echo "CI_EVIDENCE_DIR=$CI_EVIDENCE_DIR" >>"$GITHUB_ENV" mkdir -p "$CI_EVIDENCE_DIR" : >"$CI_EVIDENCE_DIR/go-test.json" python3 -I .github/scripts/ci-load.py start "$CI_EVIDENCE_DIR/load.tsv" --duration ${{ matrix.suite == 'unit' && 2400 || 5400 }} @@ -316,6 +318,7 @@ jobs: env: SUITE: ${{ matrix.suite }} run: | + if [ -z "${CI_EVIDENCE_DIR:-}" ]; then exit 0; fi python3 -I .github/scripts/ci-load.py stop "$CI_EVIDENCE_DIR/load.tsv" || true if [ "$SUITE" = process ]; then mkdir -p "$CI_EVIDENCE_DIR/shards"