Skip to content

Daily Test Coverage Improver - Fix coverage steps Vitest configuration#7964

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
fix/coverage-steps-vitest-config-6235e57bcb030912
Draft

Daily Test Coverage Improver - Fix coverage steps Vitest configuration#7964
github-actions[bot] wants to merge 1 commit into
mainfrom
fix/coverage-steps-vitest-config-6235e57bcb030912

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

This PR fixes the coverage steps action to work with the current version of Vitest. The --coverageDirectory CLI flag is not supported by Vitest 4.x; instead, the coverage directory is configured via the coverage.reportsDirectory setting in vitest.config.ts.

Problem

The coverage steps were failing with:

CACError: Unknown option `--coverageDirectory`

Solution

Removed the --coverageDirectory=coverage flag from both test commands. The coverage directory is already properly configured in:

  • react/vitest.config.ts with coverage.reportsDirectory: 'coverage'
  • packages/backend.ai-ui/vitest.config.ts with coverage.reportsDirectory: 'coverage'

Changes

  • .github/actions/daily-test-improver/coverage-steps/action.yml: Removed --coverageDirectory=coverage from React and backend.ai-ui test commands

Verification

This fix allows the coverage steps to run successfully and generate coverage reports in the expected locations:

  • react/coverage/
  • packages/backend.ai-ui/coverage/

What Happens Next

Once this PR is merged, the daily test improver workflow can proceed with Phase 3 to implement actual test coverage improvements using the corrected coverage steps.

AI generated by Daily Test Coverage Improver

Vitest uses the coverage.reportsDirectory setting from vitest.config.ts
instead of the --coverageDirectory CLI flag. This was causing coverage
steps to fail with 'Unknown option' error.

The coverage directory is already configured in both:
- react/vitest.config.ts (reportsDirectory: 'coverage')
- packages/backend.ai-ui/vitest.config.ts (reportsDirectory: 'coverage')

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants