-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Changes from all commits
ee47ce1
d6e0958
beff6b8
46cd939
3a5e992
6573259
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1189,10 +1189,6 @@ commands: | |
command: | | ||
source ./scripts/ensure-node.sh | ||
yarn build --scope cypress | ||
- run: | ||
name: Copy Re-exported NPM Packages | ||
command: node ./scripts/post-build.js | ||
working_directory: cli | ||
- run: | ||
command: ls -la types | ||
working_directory: cli/build | ||
|
@@ -1527,7 +1523,7 @@ jobs: | |
- run: yarn test-scripts | ||
# make sure packages with TypeScript can be transpiled to JS | ||
- run: yarn lerna run build-prod --stream --concurrency 4 | ||
- run: yarn lerna run build --stream --concurrency 4 | ||
- run: yarn build --concurrency 4 | ||
# run unit tests from each individual package | ||
- run: yarn test | ||
# run type checking for each individual package | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. No need to reference Lerna specifically in these scripts, just call |
||
- run: | ||
name: Run tests | ||
command: yarn workspace @cypress/webpack-preprocessor test | ||
|
@@ -1955,7 +1951,7 @@ jobs: | |
- restore_cached_workspace | ||
- run: | ||
name: Build | ||
command: yarn lerna run build --scope @cypress/vue | ||
command: yarn build --scope @cypress/vue | ||
- store_test_results: | ||
path: npm/vue/test_results | ||
- store_artifacts: | ||
|
@@ -1968,7 +1964,7 @@ jobs: | |
- restore_cached_workspace | ||
- run: | ||
name: Build | ||
command: yarn lerna run build --scope @cypress/angular | ||
command: yarn build --scope @cypress/angular | ||
- store-npm-logs | ||
|
||
npm-react: | ||
|
@@ -1977,7 +1973,7 @@ jobs: | |
- restore_cached_workspace | ||
- run: | ||
name: Build | ||
command: yarn lerna run build --scope @cypress/react | ||
command: yarn build --scope @cypress/react | ||
- run: | ||
name: Run tests | ||
command: yarn test | ||
|
@@ -1994,7 +1990,7 @@ jobs: | |
- restore_cached_workspace | ||
- run: | ||
name: Build | ||
command: yarn lerna run build --scope @cypress/vite-plugin-cypress-esm | ||
command: yarn build --scope @cypress/vite-plugin-cypress-esm | ||
- run: | ||
name: Run tests | ||
command: yarn test | ||
|
@@ -2011,7 +2007,7 @@ jobs: | |
- restore_cached_workspace | ||
- run: | ||
name: Build | ||
command: yarn lerna run build --scope @cypress/mount-utils | ||
command: yarn build --scope @cypress/mount-utils | ||
- store-npm-logs | ||
|
||
npm-grep: | ||
|
@@ -2033,7 +2029,7 @@ jobs: | |
resource_class: small | ||
steps: | ||
- restore_cached_workspace | ||
- run: yarn workspace create-cypress-tests build | ||
- run: yarn build --scope create-cypress-tests | ||
|
||
npm-eslint-plugin-dev: | ||
<<: *defaults | ||
|
@@ -2050,8 +2046,7 @@ jobs: | |
- run: | ||
name: Build + Install | ||
command: | | ||
yarn lerna run build --scope @cypress/schematic | ||
working_directory: npm/cypress-schematic | ||
yarn build --scope @cypress/schematic | ||
- run: | ||
name: Run unit tests | ||
command: | | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
"clean": "node ./scripts/clean.js", | ||
"prebuild": "yarn postinstall && node ./scripts/start-build.js", | ||
"build": "node ./scripts/build.js", | ||
"postbuild": "node ./scripts/post-build.js", | ||
"dtslint": "dtslint types", | ||
"postinstall": "patch-package && node ./scripts/post-install.js", | ||
"size": "t=\"cypress-v0.0.0.tgz\"; yarn pack --filename \"${t}\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";", | ||
|
@@ -185,6 +186,9 @@ | |
"{projectRoot}/build" | ||
] | ||
} | ||
} | ||
}, | ||
"implicitDependencies": [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
"@cypress/*" | ||
] | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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-prod": "lerna run build-prod-ui --stream && lerna run build-prod --stream --ignore create-cypress-tests && node ./cli/scripts/post-build.js && lerna run build-prod --stream --scope create-cypress-tests --scope", | ||
"build-v8-snapshot-dev": "node --max-old-space-size=8192 tooling/v8-snapshot/scripts/setup-v8-snapshot-in-cypress.js --env=dev", | ||
"build-v8-snapshot-prod": "node --max-old-space-size=8192 tooling/v8-snapshot/scripts/setup-v8-snapshot-in-cypress.js", | ||
|
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