Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,25 @@ jobs:
- run: pnpm --filter markform test:coverage

# Post coverage report (PR comment + job summary)
# Uses merged coverage from tryscript (vitest + tryscript CLI tests combined)
- name: Coverage Report
uses: davelosert/vitest-coverage-report-action@v2
if: always()
with:
# Working directory for monorepo support - action looks for vite config and coverage files here
working-directory: packages/markform
json-summary-path: coverage/coverage-summary.json
json-summary-path: coverage-tryscript/coverage-summary.json

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Point coverage actions at a generated summary file

The CI step now reads coverage-tryscript/coverage-summary.json, but tryscript is configured to emit only text, text-summary, html, and lcov reports (packages/markform/tryscript.config.mjs sets coverage.reporters to those values), which means no coverage-summary.json is produced after pnpm --filter markform test:coverage. As a result, the coverage report (and the badges step, which points at the same file) will be missing data or fail to read the summary whenever CI runs. Either add a json-summary reporter to tryscript coverage or keep the action pointed at the vitest summary that actually exists.

Useful? React with 👍 / 👎.

json-final-path: coverage/coverage-final.json
# Only show changed files on PRs, show all on main
file-coverage-mode: ${{ github.event_name == 'pull_request' && 'changes' || 'all' }}

# Generate and commit coverage badges (main branch only)
# Uses merged coverage from tryscript (vitest + tryscript CLI tests combined)
- name: Coverage Badges
uses: jpb06/coverage-badges-action@v1.4.6
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
with:
coverage-summary-path: packages/markform/coverage/coverage-summary.json
coverage-summary-path: packages/markform/coverage-tryscript/coverage-summary.json
output-folder: ./badges
branches: main

Expand Down
2 changes: 1 addition & 1 deletion packages/markform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"c8": "^10.1.3",
"monocart-coverage-reports": "^2.12.9",
"publint": "^0.3.16",
"tryscript": "^0.1.4",
"tryscript": "^0.1.6",
"tsdown": "^0.18.3",
"typescript": "^5.9.3",
"vitest": "^4.0.16"
Expand Down