Running nx run-many -t build e2e-ci causes a race-condition as e2e-ci does not depend on build on the project it is testing in nx even though the outputs from build are used by the e2e-ci--* tasks. Additionally, running nx run e2e-ci does not trigger a build and so will fail if you haven't previously run nx run build.
Expected Behavior
nx runs a dependency project's build target to run before running the e2e-ci--* tasks.
GitHub Repo
No response
Steps to Reproduce
Create a new nx project with Next.js, Playwright and Github actions using npx create-nx-workspace --pm yarn
Push to Github
yarn nx affected -t lint test build e2e-ci will fail with strange errors
> Build error occurred
[Error: ENOENT: no such file or directory, rename '/home/runner/work/engineering/engineering/apps/integral-marketing/.next/export/500.html' -> '/home/runner/work/engineering/engineering/apps/integral-marketing/.next/server/pages/500.html'] {
errno: -2,
code: 'ENOENT',
syscall: 'rename',
path: '/home/runner/work/engineering/engineering/apps/integral-marketing/.next/export/500.html',
dest: '/home/runner/work/engineering/engineering/apps/integral-marketing/.next/server/pages/500.html'
}
> playwright test src/example.spec.ts
Error: Timed out waiting 60000ms from config.webServer.
Package Manager Version
No response
Operating System
[X] macOS
[ ] Linux
[ ] Windows
[ ] Other (Please specify)
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.
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...
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.