chore: generate coverage report when deploying site (#11110)

* chore: generate coverage report when deploying site

* always generate report
pull/11119/head
Rich Harris 7 months ago committed by GitHub
parent 710c8f4924
commit a531625896
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -20,8 +20,8 @@
"check": "cd packages/svelte && pnpm build && cd ../../ && pnpm -r check", "check": "cd packages/svelte && pnpm build && cd ../../ && pnpm -r check",
"format": "prettier --write .", "format": "prettier --write .",
"lint": "prettier --check . && eslint ./", "lint": "prettier --check . && eslint ./",
"test": "vitest run --coverage", "test": "vitest run",
"test-output": "vitest run --reporter=json --outputFile=sites/svelte-5-preview/src/routes/status/results.json", "test-output": "vitest run --coverage --reporter=json --outputFile=sites/svelte-5-preview/src/routes/status/results.json",
"changeset:version": "changeset version && pnpm -r generate:version && git add --all", "changeset:version": "changeset version && pnpm -r generate:version && git add --all",
"changeset:publish": "changeset publish" "changeset:publish": "changeset publish"
}, },

@ -11,7 +11,8 @@
<p class="details"> <p class="details">
{data.results.total} tests ({data.results.suites.length} suites) {data.results.passed} passed, {data.results.total} tests ({data.results.suites.length} suites) {data.results.passed} passed,
{data.results.failed} {data.results.failed}
failed, {data.results.skipped} skipped failed, {data.results.skipped} skipped.
<a href="/coverage/index.html">See coverage report.</a>
</p> </p>
</div> </div>

@ -37,7 +37,10 @@ export default defineConfig({
exclude: [...configDefaults.exclude, '**/samples/**'], exclude: [...configDefaults.exclude, '**/samples/**'],
coverage: { coverage: {
provider: 'v8', provider: 'v8',
reporter: ['lcov', 'html'] reporter: ['lcov', 'html'],
include: ['packages/svelte/src/**'],
reportsDirectory: 'sites/svelte-5-preview/static/coverage',
reportOnFailure: true
} }
} }
}); });

Loading…
Cancel
Save