From 66173d96e32da04c734440b33d745f6f45537db5 Mon Sep 17 00:00:00 2001 From: Adam French Date: Thu, 26 Nov 2026 16:14:45 +0000 Subject: [PATCH] CI: scratch directories per run, not per commit The build runner takes two jobs at once, so the same commit pushed to two branches (main and a feature branch) ran its test job twice in parallel against one src- directory, and each run's clean-up deleted the other's source mid-test. Suffix the scratch directories (and activity-tracker's throwaway Postgres and network) with the run id. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/deploy.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index ab8b33c..52d02db 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -24,7 +24,9 @@ jobs: GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} # Kept between runs so fetches are incremental. CACHE: /home/adamf/.cache/stpweb-ci/repo.git - SRC: /home/adamf/.cache/stpweb-ci/src-${{ github.sha }} + # Per run, not just per commit: the build runner takes two jobs at + # once, and the same commit pushed to two branches runs twice. + SRC: /home/adamf/.cache/stpweb-ci/src-${{ github.sha }}-${{ github.run_id }} steps: - name: Export the pushed commit to a scratch directory shell: bash