Skip to content

Commit cffce82

Browse files
authored
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
1 parent 5e1ac44 commit cffce82

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,17 @@ jobs:
4444
- name: Visual regression test
4545
run: node --run visual
4646

47+
- name: Upload test failure artifacts
48+
if: failure()
49+
uses: actions/upload-artifact@v7
50+
with:
51+
name: test-artifacts
52+
path: |
53+
test/browser/**/__screenshots__/**
54+
test/browser/**/__traces__/**
55+
.vitest-attachments/test/**/*
56+
if-no-files-found: ignore
57+
4758
- name: Upload coverage
4859
uses: codecov/codecov-action@v5
4960
with:

vite.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ export default defineConfig(
127127
commands: { resizeColumn, dragFill },
128128
viewport,
129129
headless: true,
130-
ui: false,
131-
screenshotFailures: !isCI
130+
ui: false
132131
},
133132
setupFiles: ['test/browser/styles.css', 'test/setupBrowser.ts', 'test/failOnConsole.ts']
134133
}

0 commit comments

Comments
 (0)