From 414560f47044448d6bee5a3cf7a58d24f4f42c48 Mon Sep 17 00:00:00 2001 From: logikonline Date: Mon, 30 Mar 2026 09:47:38 -0400 Subject: [PATCH] fix(ci): isolate GOMODCACHE per job to prevent cache conflicts Move GOMODCACHE from global env to job-level env with unique paths per job. Prevents race conditions and cache corruption when jobs run in parallel, especially after the gotextdiff mirror replacement. --- .gitea/workflows/build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index fde3ec4a1c..622cd1391e 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -16,7 +16,6 @@ env: GOPRIVATE: git.marketally.com GONOSUMDB: git.marketally.com GOTOOLCHAIN: local - GOMODCACHE: /tmp/gomod-${{ github.run_id }}-${{ github.job }} GO_VERSION: "1.25.5" NODE_VERSION: "22" @@ -25,6 +24,8 @@ jobs: lint: name: Lint runs-on: linux-latest + env: + GOMODCACHE: /tmp/gomod-${{ github.run_id }}-lint steps: - name: Checkout code uses: actions/checkout@v4 @@ -66,6 +67,8 @@ jobs: test-unit: name: Unit Tests runs-on: linux-latest + env: + GOMODCACHE: /tmp/gomod-${{ github.run_id }}-unit steps: - name: Checkout code uses: actions/checkout@v4 @@ -102,6 +105,8 @@ jobs: test-pgsql: name: Integration Tests (PostgreSQL) runs-on: linux-latest + env: + GOMODCACHE: /tmp/gomod-${{ github.run_id }}-pgsql services: pgsql: image: postgres:15