Skip to content

Commit d0f042f

Browse files
hi-ogawaclaude
andauthored
docs: add tip for using HTML reporter on CI (#10023)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 146d4f0 commit d0f042f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/guide/ui.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,23 @@ npx vite preview --outDir ./html
5353
You can configure output with [`outputFile`](/config/outputfile) config option. You need to specify `.html` path there. For example, `./html/index.html` is the default value.
5454
:::
5555

56+
::: tip
57+
To view the HTML report from CI, for example in GitHub Actions, upload the output directory as an artifact:
58+
59+
```yaml
60+
- uses: actions/upload-artifact@v4
61+
id: upload-report
62+
with:
63+
name: vitest-report
64+
path: html/
65+
66+
- name: Viewer link in summary
67+
run: echo "[View HTML report](https://viewer.vitest.dev/?url=${{ steps.upload-report.outputs.artifact-url }})" >> $GITHUB_STEP_SUMMARY
68+
```
69+
70+
This adds a link to the job summary. Click it to open the report in [Vitest Viewer](https://viewer.vitest.dev/) directly in the browser. You can also download the artifact manually and extract it, then run `vite preview` locally as above.
71+
:::
72+
5673
## Module Graph
5774

5875
Module Graph's tab displays the module graph of the selected test file.

0 commit comments

Comments
 (0)