chore: add root gradle coverage and frontendCoverage tasks

- frontendCoverage: runs 'npm run test:coverage' in frontend directory
  (vitest with coverage, enforces thresholds internally)
- coverage: group='verification', runs backend jacocoTestReport and
  frontendCoverage sequentially — single command for both layers:
  ./gradlew coverage
- check task continues to run only: frontendLint → frontendTest
  (coverage verification is added per-module: jacocoTestCoverage
  Verification on backend, vitest thresholds on frontend)
This commit is contained in:
Joakim Mörling 2026-05-15 12:16:04 +02:00
parent e654d42a4f
commit 7e6124ce4a

View file

@ -15,6 +15,18 @@ tasks.register('frontendTest', Exec) {
commandLine 'npm', 'run', 'test' commandLine 'npm', 'run', 'test'
} }
tasks.register('frontendCoverage', Exec) {
description = 'Run Vitest with coverage in the frontend directory'
workingDir = file("${rootProject.projectDir}/frontend")
commandLine 'npm', 'run', 'test:coverage'
}
tasks.register('coverage') {
group = 'verification'
description = 'Run backend + frontend tests with coverage thresholds'
dependsOn(':backend:jacocoTestReport', 'frontendCoverage')
}
tasks.register('frontendE2E', Exec) { tasks.register('frontendE2E', Exec) {
description = 'Run Playwright E2E tests in Docker (CI mode)' description = 'Run Playwright E2E tests in Docker (CI mode)'
workingDir = file("${rootProject.projectDir}/frontend") workingDir = file("${rootProject.projectDir}/frontend")