-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
chore: simplify build script #27547
chore: simplify build script #27547
Conversation
@@ -185,6 +186,9 @@ | |||
"{projectRoot}/build" | |||
] | |||
} | |||
} | |||
}, | |||
"implicitDependencies": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tells Nx that all of the NPM packages need to be built before the CLI is built. We need to do this because the post-build script in CLI copies the built assets for each NPM package into the cli/build
folder, so when that happens, all of the packages need to have already been built.
@@ -14,8 +14,7 @@ | |||
"binary-zip": "node ./scripts/binary.js zip", | |||
"binary-package": "cross-env NODE_OPTIONS=--max_old_space_size=8192 node ./scripts/binary.js package", | |||
"check-binary-on-cdn": "node ./scripts/binary.js checkIfBinaryExistsOnCdn", | |||
"build": "yarn build-npm-modules && lerna run build --stream --no-bail --ignore create-cypress-tests --ignore cypress --ignore \"'@packages/{runner}'\" --ignore \"'@cypress/{angular,react,react18,vue,vue2,mount-utils,svelte}'\" && node ./cli/scripts/post-build.js && lerna run build --stream --scope create-cypress-tests", | |||
"build-npm-modules": "lerna run build --scope cypress --scope @cypress/mount-utils --scope @cypress/react && lerna run build --scope \"'@cypress/{angular,react18,vue,vue2,svelte}'\"", | |||
"build": "lerna run build --stream", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to run all of these scripts independently, we can just tell Lerna to build
and it will handle the order in which things are built
33 flaky tests on run #49996 ↗︎
Details:
runs.cy.ts • 1 flaky test • app-e2e
specs_list_latest_runs.cy.ts • 1 flaky test • app-e2e
cypress-origin-communicator.cy.ts • 1 flaky test • app-e2e
e2e/origin/cookie_login.cy.ts • 1 flaky test • 5x-driver-electron
commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-electron
The first 5 flaky specs are shown, see all 21 specs in Cypress Cloud. This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
@@ -1189,10 +1189,6 @@ commands: | |||
command: | | |||
source ./scripts/ensure-node.sh | |||
yarn build --scope cypress | |||
- run: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This runs as a postbuild script, so it will run in the previous step. No need to run it again
@@ -1910,7 +1906,7 @@ jobs: | |||
- restore_cached_workspace | |||
- run: | |||
name: Build | |||
command: yarn lerna run build --scope @cypress/webpack-preprocessor | |||
command: yarn build --scope @cypress/webpack-preprocessor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to reference Lerna specifically in these scripts, just call yarn build
and pass the arguments through.
This reverts commit 0a86ec6.
* chore: simplify build script * update CI workflows * fix workflows * empty commit because Percy weirdness
* Revert "chore: remove Typescript dependency from app node_modules in binary (#27577)" This reverts commit 60d4c83. * Revert "chore: simplify build script (#27547)" This reverts commit 0a86ec6. * Revert "chore: upgrade lerna to 6, cache build step (#26913)" This reverts commit 9e60aeb. * build everything * [run ci]
This reverts commit 0a86ec6.
* chore: simplify build script * update CI workflows * fix workflows * empty commit because Percy weirdness
This reverts commit 0a86ec6.
* chore: simplify build script * update CI workflows * fix workflows * empty commit because Percy weirdness
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Right now our build script runs three different Lerna commands to make sure that packages are built in the correct order. We don't need to do this anymore because we can specify which packages depend on which other packages to ensure that they build in the correct order.
This PR updates our
build
script to just runlerna run build
, which builds all of the packages in the repo, relying on the dependency graph in order to know which packages need to be built in which order.