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

Playwright e2e-ci--* targets do not depend on "^build" #23035

Open
1 of 4 tasks
matthewrj opened this issue Apr 26, 2024 · 1 comment
Open
1 of 4 tasks

Playwright e2e-ci--* targets do not depend on "^build" #23035

matthewrj opened this issue Apr 26, 2024 · 1 comment
Assignees
Labels
scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx type: bug

Comments

@matthewrj
Copy link

Current Behavior

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

  1. Create a new nx project with Next.js, Playwright and Github actions using npx create-nx-workspace --pm yarn
  2. Push to Github
  3. yarn nx affected -t lint test build e2e-ci will fail with strange errors

Nx Report

Node   : 20.12.2
OS     : darwin-arm64
yarn   : 1.22.21

nx (global)        : 18.3.3
nx                 : 18.3.4
@nx/js             : 18.3.4
@nx/jest           : 18.3.4
@nx/linter         : 18.3.4
@nx/eslint         : 18.3.4
@nx/workspace      : 18.3.4
@nx/devkit         : 18.3.4
@nx/eslint-plugin  : 18.3.4
@nx/next           : 18.3.4
@nx/playwright     : 18.3.4
@nx/react          : 18.3.4
@nrwl/tao          : 18.3.4
@nx/web            : 18.3.4
@nx/webpack        : 18.3.4
typescript         : 5.4.5
---------------------------------------
Registered Plugins:
@nx/next/plugin
@nx/playwright/plugin
@nx/eslint/plugin
@nx/jest/plugin
---------------------------------------
Community plugins:
@simondotm/nx-firebase : 2.3.0

Failure Logs

> 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

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

Is the same issue as #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.

@AgentEnder AgentEnder added the scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx label Apr 29, 2024
@AgentEnder AgentEnder self-assigned this Apr 29, 2024
@aramfe
Copy link

aramfe commented May 3, 2024

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx type: bug
Projects
None yet
Development

No branches or pull requests

3 participants