Commit 7481621
authored
ci: enforce lint and report coverage on PRs (#156)
## What changed
- **Lint in CI**: added a plain `pnpm exec oxlint` step to the `test`
job. The existing `lint` script is `oxlint --fix` (mutating), so CI runs
the non-mutating variant. There is no oxlint config file, which is fine
— oxlint applies its defaults.
- **Coverage config** (`vite.config.ts`): the coverage block was defined
but not `enabled`, and its `reporter` list lacked `json-summary`
(required by the report action). Added `enabled: true`,
`reportOnFailure: true`, and `json-summary` to the reporter list.
Provider/include/exclude unchanged.
- **Coverage reporting**: added the SHA-pinned
`davelosert/vitest-coverage-report-action@…3c50566 # v2` step (`if:
always()`, `pr-number: auto`) matching codemirror-mcp. The job already
has `pull-requests: write`.
## Why
The lint script and a coverage config already existed but CI never ran
lint, and coverage was neither enabled nor emitting the `json-summary`
the reporter needs — so coverage was effectively invisible on PRs. This
turns both into visible PR gates.
## How verified
- `pnpm install --frozen-lockfile`
- `pnpm exec oxlint` — exit 0 (1 pre-existing `no-unused-expressions`
warning, non-blocking; no source changes needed)
- `pnpm run test` — 206 passed + 1 expected-fail across 11 test files
(including the Playwright browser project);
`coverage/coverage-summary.json` is generated and `coverage/` is
gitignored.
No mechanical source fixes were required. Part of the marimo-team
engineering-excellence initiative to make existing-but-unenforced
quality gates actually run in CI.1 parent 749da92 commit 7481621
2 files changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
44 | 53 | | |
45 | 54 | | |
46 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | | - | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
0 commit comments