From b24d53b82fabdb53a875db63ff5f8632a0fdbb52 Mon Sep 17 00:00:00 2001 From: Ilia Denisov Date: Wed, 20 May 2026 17:26:49 +0200 Subject: [PATCH] ci: install pnpm into a per-job dir to fix the host-runner setup race MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `pnpm/action-setup@v4` defaults to installing pnpm in the shared `~/setup-pnpm`. On the single host-mode runner $HOME is shared across concurrent jobs, so when two pnpm jobs overlap (e.g. a post-merge `dev-deploy` and `ui-test`, which sit in different concurrency groups) their self-installers race and one fails with `ENOTEMPTY ... rmdir '~/setup-pnpm/node_modules/.bin/store/v11/files'` before the tests even run. Point each step's `dest` at `${{ runner.temp }}/setup-pnpm` (a per-job isolated directory) so concurrent jobs never share the install location. The action still adds `dest` to PATH, so setup-node's pnpm cache and later `pnpm` calls are unaffected; the pnpm package store stays shared (safe — pnpm locks it). Applied to the three workflows that set up pnpm: ui-test, dev-deploy, prod-build. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitea/workflows/dev-deploy.yaml | 5 +++++ .gitea/workflows/prod-build.yaml | 5 +++++ .gitea/workflows/ui-test.yaml | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/.gitea/workflows/dev-deploy.yaml b/.gitea/workflows/dev-deploy.yaml index bdbdd5d..0aa4bab 100644 --- a/.gitea/workflows/dev-deploy.yaml +++ b/.gitea/workflows/dev-deploy.yaml @@ -53,6 +53,11 @@ jobs: uses: pnpm/action-setup@v4 with: version: 11.0.7 + # Install pnpm into a per-job directory so concurrent jobs on + # the shared host runner do not race on the default + # `~/setup-pnpm` (the self-installer otherwise fails with + # `ENOTEMPTY` while cleaning a sibling job's install). + dest: ${{ runner.temp }}/setup-pnpm - name: Set up Node uses: actions/setup-node@v4 diff --git a/.gitea/workflows/prod-build.yaml b/.gitea/workflows/prod-build.yaml index 4e54788..1f860c3 100644 --- a/.gitea/workflows/prod-build.yaml +++ b/.gitea/workflows/prod-build.yaml @@ -43,6 +43,11 @@ jobs: uses: pnpm/action-setup@v4 with: version: 11.0.7 + # Install pnpm into a per-job directory so concurrent jobs on + # the shared host runner do not race on the default + # `~/setup-pnpm` (the self-installer otherwise fails with + # `ENOTEMPTY` while cleaning a sibling job's install). + dest: ${{ runner.temp }}/setup-pnpm - name: Set up Node uses: actions/setup-node@v4 diff --git a/.gitea/workflows/ui-test.yaml b/.gitea/workflows/ui-test.yaml index e78e722..6142c50 100644 --- a/.gitea/workflows/ui-test.yaml +++ b/.gitea/workflows/ui-test.yaml @@ -44,6 +44,11 @@ jobs: uses: pnpm/action-setup@v4 with: version: 11.0.7 + # Install pnpm into a per-job directory so concurrent jobs on + # the shared host runner do not race on the default + # `~/setup-pnpm` (the self-installer otherwise fails with + # `ENOTEMPTY` while cleaning a sibling job's install). + dest: ${{ runner.temp }}/setup-pnpm - name: Set up Node uses: actions/setup-node@v4 -- 2.52.0