chore: Enhance frontend CI workflow for improved test coverage reporting
Some checks failed
LabFusion CI/CD Pipeline / api-gateway (push) Failing after 41s
Docker Build and Push / build-and-push (push) Failing after 41s
LabFusion CI/CD Pipeline / service-adapters (push) Successful in 57s
Integration Tests / integration-tests (push) Failing after 40s
Integration Tests / performance-tests (push) Has been skipped
LabFusion CI/CD Pipeline / api-docs (push) Successful in 1m44s
Frontend (React) / test (20) (push) Failing after 1m29s
Frontend (React) / build (push) Has been skipped
Frontend (React) / lighthouse (push) Has been skipped
LabFusion CI/CD Pipeline / frontend (push) Successful in 4m1s
LabFusion CI/CD Pipeline / integration-tests (push) Has been skipped
Some checks failed
LabFusion CI/CD Pipeline / api-gateway (push) Failing after 41s
Docker Build and Push / build-and-push (push) Failing after 41s
LabFusion CI/CD Pipeline / service-adapters (push) Successful in 57s
Integration Tests / integration-tests (push) Failing after 40s
Integration Tests / performance-tests (push) Has been skipped
LabFusion CI/CD Pipeline / api-docs (push) Successful in 1m44s
Frontend (React) / test (20) (push) Failing after 1m29s
Frontend (React) / build (push) Has been skipped
Frontend (React) / lighthouse (push) Has been skipped
LabFusion CI/CD Pipeline / frontend (push) Successful in 4m1s
LabFusion CI/CD Pipeline / integration-tests (push) Has been skipped
### Summary of Changes - Updated the test command in the CI workflow to use `npx vitest` for running tests with coverage. - Added a verification step to check for the presence of coverage files (`lcov.info` and `clover.xml`). - Configured Vitest to output JUnit test results and detailed coverage reports in the specified directory. ### Expected Results - Improved visibility and reliability of test coverage metrics, facilitating better quality assurance processes.
This commit is contained in:
@@ -7,5 +7,21 @@ export default defineConfig({
|
||||
environment: 'jsdom',
|
||||
setupFiles: ['./src/setupTests.js'],
|
||||
globals: true,
|
||||
reporter: ['verbose', 'junit'],
|
||||
outputFile: {
|
||||
junit: './coverage/test-results.xml'
|
||||
},
|
||||
coverage: {
|
||||
provider: 'v8',
|
||||
reporter: ['text', 'html', 'lcov', 'clover'],
|
||||
reportsDirectory: './coverage',
|
||||
include: ['src/**/*.{js,jsx}'],
|
||||
exclude: [
|
||||
'src/**/*.test.{js,jsx}',
|
||||
'src/**/*.spec.{js,jsx}',
|
||||
'src/setupTests.js',
|
||||
'src/index.js'
|
||||
]
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user