From cffce82ede25603bf8c95691cecc9a4144d57be7 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien <567105+nstepien@users.noreply.github.com> Date: Tue, 10 Mar 2026 20:02:33 +0000 Subject: [PATCH] Upload test failure artifacts in CI (#3998) * Upload test failure screenshots and traces in CI * make a test fail for demo * remove demo * run tests until I find that flaky test * disable timeout * cleanup * upload `.vitest-attachments`, test it * run upload action after visual tests * revert diff test change --- .github/workflows/ci.yml | 11 +++++++++++ vite.config.ts | 3 +-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e30dbf2fe..d500bd3134 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,6 +44,17 @@ jobs: - name: Visual regression test run: node --run visual + - name: Upload test failure artifacts + if: failure() + uses: actions/upload-artifact@v7 + with: + name: test-artifacts + path: | + test/browser/**/__screenshots__/** + test/browser/**/__traces__/** + .vitest-attachments/test/**/* + if-no-files-found: ignore + - name: Upload coverage uses: codecov/codecov-action@v5 with: diff --git a/vite.config.ts b/vite.config.ts index 3053cfaf87..34241f7ccc 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -127,8 +127,7 @@ export default defineConfig( commands: { resizeColumn, dragFill }, viewport, headless: true, - ui: false, - screenshotFailures: !isCI + ui: false }, setupFiles: ['test/browser/styles.css', 'test/setupBrowser.ts', 'test/failOnConsole.ts'] }