From eb549e6049e9549b567ebd7ea65dc6ba88970f22 Mon Sep 17 00:00:00 2001 From: Ilia Denisov Date: Sun, 31 May 2026 12:15:32 +0200 Subject: [PATCH] ci(ui-test): clean root-owned build artifacts so runner teardown succeeds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In host-mode the ui-test job runs as root, so vite (test:pwa), svelte-kit and Playwright write build/, .svelte-kit/, test-results/ and playwright-report/ root-owned into the shared host workspace. The act_runner (non-root) then cannot remove them at teardown ("unlinkat ui/frontend/build: permission denied"), which spuriously marks this or a sibling job that inherits the dirty workspace as failed — it hit go-unit on the #83 merge even though every test passed. Add an `if: always()` step that removes those generated dirs while the job still has root, after the artifact uploads. Keeps the shared workspace clean for the runner's own teardown and for later jobs. --- .gitea/workflows/ui-test.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.gitea/workflows/ui-test.yaml b/.gitea/workflows/ui-test.yaml index 97e0333..8cfb439 100644 --- a/.gitea/workflows/ui-test.yaml +++ b/.gitea/workflows/ui-test.yaml @@ -119,3 +119,16 @@ jobs: name: playwright-traces path: ui/frontend/test-results/ retention-days: 14 + + - name: Remove root-owned build artifacts + if: always() + # In host-mode the job runs as root, so vite (test:pwa), + # svelte-kit and Playwright write these outputs root-owned into + # the shared host workspace. The act_runner (non-root) then + # cannot remove them at teardown ("unlinkat ... permission + # denied"), which spuriously fails this or a sibling job that + # inherits the dirty workspace (observed on go-unit). Clean them + # here while the step still has root, after the uploads above. + run: | + rm -rf ui/frontend/build ui/frontend/.svelte-kit \ + ui/frontend/test-results ui/frontend/playwright-report -- 2.52.0