Closed matthewrj closed 3 months ago
Is there any workaround to get all the depenended packages for each DTE agents? Can't use yarn nx e2e-ci without loosing the benefits of DTE, if I need to explicitly build each package from ^build...
Hey! I get the frustration. On the latest nx 19.5, you can simply define a targetDefault with a glob in nx.json
to specify that all e2e-ci-*
targets should depend on ^build
like this:
"targetDefaults" : {
"e2e-ci--**/*": {
"dependsOn": ["^build"]
}
}
If you cannot upgrade for some reason, you can specify the dependency manually for every single atomized e2e-ci--* target.
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
Running
nx run-many -t build e2e-ci
causes a race-condition ase2e-ci
does not depend onbuild
on the project it is testing in nx even though the outputs frombuild
are used by thee2e-ci--*
tasks. Additionally, runningnx run e2e-ci
does not trigger a build and so will fail if you haven't previously runnx run build
.Expected Behavior
nx runs a dependency project's
build
target to run before running thee2e-ci--*
tasks.GitHub Repo
No response
Steps to Reproduce
npx create-nx-workspace --pm yarn
yarn nx affected -t lint test build e2e-ci
will fail with strange errorsNx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
Is the same issue as https://github.com/nrwl/nx/issues/22787. The solution proposed here is to split up the commands in the Github action, however I don't think this is the right solution as you're pushing the task dependency management up to Github actions instead of keeping it in nx.