mirror of
https://github.com/facebook/lexical.git
synced 2025-05-17 15:18:47 +08:00
Use Vite server for E2E tests in CI (Fix windows CI failures) (#2584)
* Use Vite dev server for E2E tests in CI * use webServer * whoops * use static file server * remove unused dependencies * fix prod commands
This commit is contained in:
27
package.json
27
package.json
@ -15,8 +15,9 @@
|
||||
"scripts": {
|
||||
"start": "cross-env NODE_ENV=development concurrently \"npm:collab\" \"npm run dev --prefix packages/lexical-playground\"",
|
||||
"start:website": "npm run start --prefix packages/lexical-website-new -- --port 3001",
|
||||
"start:playground": "serve packages/lexical-playground/build -l 4000",
|
||||
"start:playground": "npm run start-test-server",
|
||||
"dev": "npm run dev --prefix packages/lexical-playground",
|
||||
"start-test-server": "npm run preview --prefix packages/lexical-playground -- --port 4000",
|
||||
"build": "node scripts/build.js",
|
||||
"build-prod": "npm run clean && npm run build -- --prod",
|
||||
"build-playground-prod": "npm run build-prod && npm run build-prod --prefix packages/lexical-playground",
|
||||
@ -44,14 +45,14 @@
|
||||
"test-e2e-collab-webkit": "cross-env E2E_BROWSER=webkit E2E_EDITOR_MODE=rich-text-with-collab playwright test --project=\"webkit\"",
|
||||
"test-e2e-prod-chromium": "cross-env E2E_BROWSER=chromium E2E_PORT=4000 playwright test --project=\"chromium\"",
|
||||
"test-e2e-collab-prod-chromium": "cross-env E2E_BROWSER=chromium E2E_PORT=4000 E2E_EDITOR_MODE=rich-text-with-collab playwright test --project=\"chromium\"",
|
||||
"test-e2e-ci-chromium": "cross-env E2E_PORT=4000 start-server-and-test prepare-ci 4000 test-e2e-chromium",
|
||||
"test-e2e-ci-firefox": "cross-env E2E_PORT=4000 start-server-and-test prepare-ci 4000 test-e2e-firefox",
|
||||
"test-e2e-ci-webkit": "cross-env E2E_PORT=4000 start-server-and-test prepare-ci 4000 test-e2e-webkit",
|
||||
"test-e2e-collab-ci-chromium": "cross-env E2E_PORT=4000 start-server-and-test prepare-ci-collab 4000 test-e2e-collab-chromium",
|
||||
"test-e2e-collab-ci-firefox": "cross-env E2E_PORT=4000 start-server-and-test prepare-ci-collab 4000 test-e2e-collab-firefox",
|
||||
"test-e2e-collab-ci-webkit": "cross-env E2E_PORT=4000 start-server-and-test prepare-ci-collab 4000 test-e2e-collab-webkit",
|
||||
"test-e2e-prod-ci-chromium": "cross-env E2E_PORT=4000 start-server-and-test prepare-ci-prod 4000 test-e2e-prod-chromium",
|
||||
"test-e2e-collab-prod-ci-chromium": "cross-env E2E_PORT=4000 start-server-and-test prepare-ci-collab-prod 4000 test-e2e-collab-prod-chromium",
|
||||
"test-e2e-ci-chromium": "npm run prepare-ci && cross-env E2E_PORT=4000 npm run test-e2e-chromium",
|
||||
"test-e2e-ci-firefox": "npm run prepare-ci && cross-env E2E_PORT=4000 npm run test-e2e-firefox",
|
||||
"test-e2e-ci-webkit": "npm run prepare-ci && cross-env E2E_PORT=4000 npm run test-e2e-webkit",
|
||||
"test-e2e-collab-ci-chromium": "npm run prepare-ci && cross-env E2E_PORT=4000 concurrently -k -s \"first\" \"npm run collab\" \"npm run test-e2e-collab-chromium\"",
|
||||
"test-e2e-collab-ci-firefox": "npm run prepare-ci && cross-env E2E_PORT=4000 concurrently -k -s \"first\" \"npm run collab\" \"npm run test-e2e-collab-firefox\"",
|
||||
"test-e2e-collab-ci-webkit": "npm run prepare-ci && cross-env E2E_PORT=4000 concurrently -k -s \"first\" \"npm run collab\" \"npm run test-e2e-collab-webkit\"",
|
||||
"test-e2e-prod-ci-chromium": "npm run prepare-ci-prod && cross-env E2E_PORT=4000 npm run test-e2e-prod-chromium",
|
||||
"test-e2e-collab-prod-ci-chromium": " npm run prepare-ci-prod && cross-env E2E_PORT=4000 concurrently -k -s \"first\" \"npm run collab\" \"npm run test-e2e-collab-prod-chromium\"",
|
||||
"run-all": "npm-run-all debug-test-e2e-*",
|
||||
"debug-test-e2e": "cross-env playwright test --debug",
|
||||
"debug-test-e2e-chromium": "cross-env E2E_BROWSER=chromium playwright test --debug --project=\"chromium\"",
|
||||
@ -83,10 +84,8 @@
|
||||
"prettier": "prettier --list-different .",
|
||||
"ci-check": "npm-run-all --parallel tsc flow prettier lint",
|
||||
"prettier:fix": "prettier --write .",
|
||||
"prepare-ci": "npm run build-dev --prefix packages/lexical-playground && serve packages/lexical-playground/build -l 4000",
|
||||
"prepare-ci-collab": "npm run build-dev --prefix packages/lexical-playground && concurrently \"npm run collab\" \"serve packages/lexical-playground/build -l 4000\"",
|
||||
"prepare-ci-prod": "npm run build-playground-prod && serve packages/lexical-playground/build -l 4000",
|
||||
"prepare-ci-collab-prod": "npm run build-playground-prod && concurrently \"npm run collab\" \"serve packages/lexical-playground/build -l 4000\"",
|
||||
"prepare-ci": "npm run build-dev --prefix packages/lexical-playground",
|
||||
"prepare-ci-prod": "npm run build-playground-prod",
|
||||
"prepare-release": "npm run build-release && node ./scripts/npm/prepare-release.js",
|
||||
"prepare": "husky install",
|
||||
"prepare-www": "node scripts/www/rewriteImports.js",
|
||||
@ -150,8 +149,6 @@
|
||||
"prettier-plugin-organize-attributes": "^0.0.5",
|
||||
"react-test-renderer": "^17.0.2",
|
||||
"rollup": "^2.75.5",
|
||||
"serve": "^13.0.2",
|
||||
"start-server-and-test": "^1.13.0",
|
||||
"tmp": "^0.2.1",
|
||||
"ts-jest": "^28.0.2",
|
||||
"typescript": "^4.6.4",
|
||||
|
@ -39,5 +39,13 @@ const config = {
|
||||
//trace: 'retain-on-failure',
|
||||
video: 'on-first-retry',
|
||||
},
|
||||
webServer: IS_CI
|
||||
? {
|
||||
command: 'npm run start-test-server',
|
||||
port: 4000,
|
||||
reuseExistingServer: true,
|
||||
timeout: 120 * 1000,
|
||||
}
|
||||
: undefined,
|
||||
};
|
||||
module.exports = config;
|
||||
|
Reference in New Issue
Block a user