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

Add --skip-nx-cache when running "yarn test" #2865

Merged
merged 1 commit into from
Oct 31, 2023
Merged

Add --skip-nx-cache when running "yarn test" #2865

merged 1 commit into from
Oct 31, 2023

Conversation

philrz
Copy link
Contributor

@philrz philrz commented Oct 26, 2023

I recently noticed when running tests locally that I'd often see output like this:

$ yarn test
 
    ✔  nx run zed-js:test  [existing outputs match the cache, left as is]
    ✔  nx run sample-data:test  [existing outputs match the cache, left as is]
    ✔  nx run zui-test-data:test  [existing outputs match the cache, left as is
    ✔  nx run zed-node:test  [existing outputs match the cache, left as is]
    ✔  nx run zui:test  [existing outputs match the cache, left as is]
    ✔  nx run insiders:test  [existing outputs match the cache, left as is]

 ——————————————————————————————————————————————————————————————————————————————

 >  NX   Successfully ran target test for 6 projects (319ms)
 
   Nx read the output from the cache instead of running the command for 6 out of 6 tasks.

@jameskerr explained that I could just do yarn test --skip-nx-cache to for the tests to run without using the cache. However, considering the frequency with which we debug tests that fail intermittently, it didn't seem like the speed of leveraging the cache is what we'd usually want. @jameskerr did confirm that he's also been tacking --skip-nx-cache a lot lately with tests, so rather than developing my own nervous habit of doing the same, instead this PR proposes just making it the new default behavior.

@philrz philrz requested a review from jameskerr October 26, 2023 23:00
@philrz philrz self-assigned this Oct 26, 2023
@jameskerr jameskerr merged commit a9f262d into main Oct 31, 2023
3 checks passed
@jameskerr jameskerr deleted the skip-nx-cache branch October 31, 2023 20:58
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.

2 participants