fix: add explicit error hint for coverage threshold failures in frontend test step#17937
fix: add explicit error hint for coverage threshold failures in frontend test step#17937FelixMalfait merged 2 commits intomainfrom
Conversation
Greptile OverviewGreptile SummaryAdds a helpful error step to the CI workflow that provides explicit guidance when frontend tests fail due to coverage threshold issues. When the test task fails, developers now see a clear message explaining that coverage thresholds might not be met and instructions to debug locally using Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 9f95577 |
| run: | | ||
| echo "::error::The test task failed. If no individual test is failing, this is likely a coverage threshold not being met." | ||
| echo "" | ||
| echo "To debug locally, run: npx nx run twenty-front:test:ci" |
There was a problem hiding this comment.
Bug: The CI error message suggests npx nx run twenty-front:test:ci for local debugging, which doesn't replicate the CI's nx affected behavior, potentially masking issues.
Severity: MEDIUM
Suggested Fix
Update the CI workflow's error message to provide a command that more accurately replicates the CI environment. A more accurate command would be npx nx affected --configuration=ci -t=test --exclude='*,!tag:scope:frontend' which uses nx affected to mirror the CI's behavior of testing only impacted files.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: .github/workflows/ci-front.yaml#L208
Potential issue: The CI workflow for frontend tests uses `nx affected` to run tests only
on changed files. However, if a test fails, the error message suggests developers run
`npx nx run twenty-front:test:ci` locally. While this command is valid, it runs tests on
the entire project, not just the affected files. This discrepancy can lead to situations
where a failure, such as not meeting a coverage threshold, cannot be reproduced locally,
causing confusion and wasted debugging time for developers. The local test run might
pass while the CI continues to fail.
LogDetails |
|
Hey @mabdullahabaid! After you've done the QA of your Pull Request, you can mark it as done here. Thank you! |
1 similar comment
|
Hey @mabdullahabaid! After you've done the QA of your Pull Request, you can mark it as done here. Thank you! |
No description provided.