From d99ffa9b40643439db0dad90f33cedab3e8aea28 Mon Sep 17 00:00:00 2001 From: Devin Major Date: Thu, 23 Apr 2026 15:03:54 -0400 Subject: [PATCH] fix cache error in build --- .gitea/workflows/run-tests.yaml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/run-tests.yaml b/.gitea/workflows/run-tests.yaml index e5af4a6..4e54e60 100644 --- a/.gitea/workflows/run-tests.yaml +++ b/.gitea/workflows/run-tests.yaml @@ -42,11 +42,19 @@ jobs: uses: actions/setup-node@v4 with: node-version: '18' - cache: 'npm' - cache-dependency-path: Development/server/package-lock.json + + # Redirect the npm cache away from /root/.npm (root-owned on this runner) + # to a writable temp directory. Also clears any stale node_modules left + # by a previous run that the root-owned cache could not clean up. + - name: Fix npm cache permissions + run: | + mkdir -p /tmp/npm-cache + rm -rf node_modules || true - name: Install dependencies - run: npm ci --prefer-offline + env: + NPM_CONFIG_CACHE: /tmp/npm-cache + run: npm ci # Write a minimal env file so dotenv does not error on startup. # These tests do not hit the database; DB_* values are placeholders.