diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08c5d20d..7f6fd9fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 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 diff --git a/packages/markform/tryscript.config.mjs b/packages/markform/tryscript.config.mjs index 581311ca..c50763dc 100644 --- a/packages/markform/tryscript.config.mjs +++ b/packages/markform/tryscript.config.mjs @@ -19,7 +19,7 @@ export default defineConfig({ // See: https://github.com/jlevy/tryscript/blob/main/docs/tryscript-reference.md coverage: { reportsDir: 'coverage-tryscript', - reporters: ['text', 'text-summary', 'html', 'lcov'], + reporters: ['text', 'text-summary', 'html', 'lcov', 'json-summary'], include: ['dist/**'], src: 'src', excludeNodeModules: true,