Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(testing): correctly set task status for failed coverage reports #14008

Merged
merged 1 commit into from
Jan 3, 2023

Conversation

barbados-clemens
Copy link
Contributor

Current Behavior

when coverage isn't met vitest shows error but nx says it was successful

Expected Behavior

not met coverage limits should cause tasks to fail

Related Issue(s)

Also noticed an incosistency with the coverage paths set by the vitest generator.

basically using the {workspaceRoot} and {projectRoot} variables in the executor options which are not currently expanded so the folder structure results in the actual test {workspaceRoot} as the folder names.

Also by default coverage reports are placed in the project root (where vitest runs). Should this line up with jest and be in the root /coverage/ directory?

I initially thought so based on the standalone project (since project root is also the workspace root) but noticed in integrated repo it's actually the project root. Open to whatever makes sense just wanted to fix the paths but need to know where they should be for the generator and migration

Fixes #13676

@barbados-clemens barbados-clemens added the scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx label Dec 23, 2022
@barbados-clemens barbados-clemens self-assigned this Dec 23, 2022
@vercel
Copy link

vercel bot commented Dec 23, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
nx-dev ⬜️ Ignored (Inspect) Dec 28, 2022 at 9:01PM (UTC)

@barbados-clemens barbados-clemens changed the title fix(testing): correctly set task status for failed coverage repos fix(testing): correctly set task status for failed coverage reports Dec 23, 2022
@nx-cloud
Copy link

nx-cloud bot commented Dec 23, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 08ea6f6. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 21 targets

Sent with 💌 from NxCloud.

@AgentEnder
Copy link
Member

IMHO they should line up with paths from other executor options, which tend to be based on workspace root

@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx
Projects
None yet
3 participants