Daily Test Coverage Improver - Fix Vitest 4 Coverage Command#7981
Draft
github-actions[bot] wants to merge 1 commit into
Draft
Daily Test Coverage Improver - Fix Vitest 4 Coverage Command#7981github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
…ommands Vitest 4 no longer supports the --coverageDirectory CLI flag. Coverage directory is configured in vitest.config.ts files instead. Changes: - Remove --coverageDirectory=coverage flag from React test command - Remove --coverageDirectory=coverage flag from backend.ai-ui test command - Coverage directory already set in vitest.config.ts (reportsDirectory: 'coverage') Tested: - React coverage: 5.33% stmt | 3.59% branch | 5.32% func | 6.48% lines - backend.ai-ui: 9.23% stmt | 7.71% branch | 12.04% func | 10.94% lines Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
|
1 similar comment
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the coverage-steps action.yml to work with Vitest 4 by removing the deprecated
--coverageDirectoryflag.Problem
The coverage steps were failing with:
This is because Vitest 4 removed support for the
--coverageDirectoryCLI flag. The coverage directory should be configured invitest.config.tsinstead (which it already is).Changes
--coverageDirectory=coverageflag from React test command--coverageDirectory=coverageflag from backend.ai-ui test commandreact/vitest.config.tsandpackages/backend.ai-ui/vitest.config.tsviareportsDirectory: 'coverage'Testing
Successfully ran both test suites with coverage:
React Project
backend.ai-ui Project
Reproducibility
Coverage reports are generated at:
react/coverage/index.htmlpackages/backend.ai-ui/coverage/index.htmlWhat Happens Next
Once this PR is merged, the next workflow run can proceed with Phase 3, where actual test coverage improvements will be implemented systematically using the working coverage steps.