@vitest-evals/github-reporter 0.9.0-beta.5 → 0.9.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -66
- package/dist/cli.js +367 -153
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +366 -152
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +5 -32
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -32
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,86 +1,74 @@
|
|
|
1
1
|
# @vitest-evals/github-reporter
|
|
2
2
|
|
|
3
|
-
GitHub Actions reporting for `vitest-evals` runs.
|
|
3
|
+
GitHub Actions reporting internals for `vitest-evals` runs.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
test's `meta` field, which is where `vitest-evals` records harness runs,
|
|
7
|
-
scores, judge rationales, usage, and tool calls.
|
|
5
|
+
The user-facing API is the native GitHub Action:
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
```sh
|
|
15
|
-
pnpm exec vitest run apps packages \
|
|
16
|
-
--config=./vitest.config.ts \
|
|
17
|
-
--reporter=vitest-evals/reporter \
|
|
18
|
-
--reporter=json \
|
|
19
|
-
--outputFile.json=vitest-results.json
|
|
20
|
-
|
|
21
|
-
pnpm exec vitest-evals-github-report
|
|
7
|
+
```yaml
|
|
8
|
+
- uses: getsentry/vitest-evals@v0
|
|
9
|
+
if: always()
|
|
10
|
+
with:
|
|
11
|
+
results: vitest-results.json
|
|
22
12
|
```
|
|
23
13
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## Check Run
|
|
28
|
-
|
|
29
|
-
To publish a separate `vitest-evals` Check Run, opt in explicitly:
|
|
14
|
+
The action reads Vitest's built-in JSON report. Vitest JSON includes each test's
|
|
15
|
+
`meta` field, which is where `vitest-evals` records harness runs, scores, judge
|
|
16
|
+
rationales, usage, and tool calls.
|
|
30
17
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
```
|
|
18
|
+
JUnit XML can still be emitted for CI systems that expect it, but it is not the
|
|
19
|
+
source of truth for eval reporting.
|
|
34
20
|
|
|
35
|
-
|
|
36
|
-
with `checks: write`. If configuration or permission is missing, the command
|
|
37
|
-
keeps the job summary and workflow annotations and warns instead of failing.
|
|
21
|
+
## Check Run
|
|
38
22
|
|
|
39
23
|
```yaml
|
|
40
24
|
permissions:
|
|
41
25
|
contents: read
|
|
42
26
|
checks: write
|
|
27
|
+
|
|
28
|
+
steps:
|
|
29
|
+
- uses: getsentry/vitest-evals@v0
|
|
30
|
+
if: always()
|
|
31
|
+
with:
|
|
32
|
+
results: vitest-results.json
|
|
33
|
+
publish-check: true
|
|
43
34
|
```
|
|
44
35
|
|
|
45
|
-
|
|
36
|
+
If configuration or permission is missing, the action keeps the job summary and
|
|
37
|
+
workflow annotations and warns instead of failing.
|
|
38
|
+
|
|
39
|
+
## Sharded Reports
|
|
40
|
+
|
|
41
|
+
Upload one JSON artifact per shard, then publish one combined report from a
|
|
42
|
+
final reducer job:
|
|
46
43
|
|
|
47
44
|
```yaml
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
with:
|
|
59
|
-
node-version: 20
|
|
60
|
-
cache: pnpm
|
|
61
|
-
- run: pnpm install
|
|
62
|
-
|
|
63
|
-
- name: Run evals
|
|
64
|
-
run: |
|
|
65
|
-
pnpm exec vitest run apps packages \
|
|
66
|
-
--config=./vitest.config.ts \
|
|
67
|
-
--reporter=vitest-evals/reporter \
|
|
68
|
-
--reporter=json \
|
|
69
|
-
--outputFile.json=vitest-results.json
|
|
70
|
-
|
|
71
|
-
- name: Publish eval report
|
|
72
|
-
if: always()
|
|
73
|
-
env:
|
|
74
|
-
GITHUB_TOKEN: ${{ github.token }}
|
|
75
|
-
run: |
|
|
76
|
-
pnpm exec vitest-evals-github-report --check-run
|
|
45
|
+
- uses: actions/download-artifact@v4
|
|
46
|
+
with:
|
|
47
|
+
pattern: vitest-evals-*
|
|
48
|
+
path: eval-results
|
|
49
|
+
merge-multiple: true
|
|
50
|
+
|
|
51
|
+
- uses: getsentry/vitest-evals@v0
|
|
52
|
+
with:
|
|
53
|
+
results: eval-results/*.json
|
|
54
|
+
publish-check: true
|
|
77
55
|
```
|
|
78
56
|
|
|
79
|
-
##
|
|
57
|
+
## Inputs
|
|
58
|
+
|
|
59
|
+
| Input | Default | Description |
|
|
60
|
+
| --- | --- | --- |
|
|
61
|
+
| `results` | `vitest-results.json` | Vitest JSON result files. Supports paths, `*` and `**` globs, and newline-separated entries. |
|
|
62
|
+
| `publish-summary` | `true` | Write a GitHub Actions job summary. |
|
|
63
|
+
| `publish-annotations` | `true` | Emit GitHub workflow annotations for failed evals. |
|
|
64
|
+
| `publish-check` | `false` | Publish one GitHub Check Run for the combined report. |
|
|
65
|
+
| `check-name` | `vitest-evals` | Name of the GitHub Check Run. |
|
|
66
|
+
| `github-token` | `${{ github.token }}` | Token used for Check Run publishing. |
|
|
67
|
+
| `fail-on-failures` | `false` | Fail the action when the combined report failed. |
|
|
68
|
+
| `max-annotations` | unset | Maximum number of failure annotations to publish. Check Run annotations are capped at 50 by GitHub. |
|
|
69
|
+
| `max-failures` | unset | Maximum number of detailed failures to include in summaries and checks. |
|
|
70
|
+
|
|
71
|
+
## CLI
|
|
80
72
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
- Long judge reasons live inside `<details>` blocks and fenced text.
|
|
84
|
-
- Workflow annotations include only the first useful failure line.
|
|
85
|
-
- Check Run annotations include richer `raw_details` when available.
|
|
86
|
-
- Output is plain ASCII markdown.
|
|
73
|
+
The package still ships `vitest-evals-github-report` for local debugging and
|
|
74
|
+
backward compatibility. GitHub workflows should use the native action.
|