@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 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
- This package reads Vitest's built-in JSON report. Vitest JSON includes each
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
- JUnit XML can still be emitted for CI systems that expect it, but it is not the
10
- source of truth for eval reporting.
11
-
12
- ## Usage
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
- In GitHub Actions, the reporter writes to `GITHUB_STEP_SUMMARY` when available
25
- and emits terse workflow-command annotations for failed evals.
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
- ```sh
32
- GITHUB_TOKEN=... pnpm exec vitest-evals-github-report --check-run
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
- The Check Run path requires the normal GitHub Actions environment plus a token
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
- ## Recommended Workflow
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
- jobs:
49
- evals:
50
- runs-on: ubuntu-latest
51
- permissions:
52
- contents: read
53
- checks: write
54
- steps:
55
- - uses: actions/checkout@v4
56
- - uses: pnpm/action-setup@v4
57
- - uses: actions/setup-node@v4
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
- ## Output Rules
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
- - Job summary is the primary human-readable report.
82
- - Failure lists use numbered key/value blocks, not wide tables.
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.