Sequential execution order for dependencies with run-many / affected #30777
KingScouter
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a repo with multiple projects. For every project I have an E2E-test-target, which each depends on a separate preparation-target to do some cleanup before the execution. The test should run in sequence, exactly like if I would execute them one by one.
At the moment however, NX seems to calculate the dependency-graph, retrieves all of the dependsOn-targets and moves them into the front of the execution-queue. So in the end all of my preparation-steps are executed at the start, and after all preparation-steps are done, the tests are executed.
This however doesn't work for me, as I need to execute each preparation step directly before executing the corresponding test-step (in my case the preparation also includes resetting a Docker-container for a clean test-environment).
A short visualization to clarify what I mean:
NX-configuration:
I execute the tests using:
nx run-many -t e2e --parallel=1
This executes the targets in the following order:
projA:reset-env -> projB:reset-env -> projA:e2e -> projB:e2e
However the order I need would be:
projA:reset-env -> projA:e2e -> projB:reset-env -> projB:e2e
Is there any way to achieve this with NX? Or do I really need to execute the tests one by one?
Beta Was this translation helpful? Give feedback.
All reactions