Skip to content

Commit

Permalink
Merge branch 'develop' into feature/experimental-retries
Browse files Browse the repository at this point in the history
  • Loading branch information
MuazOthman authored Oct 4, 2023
2 parents 9799c53 + 6bdebd7 commit eb794a3
Show file tree
Hide file tree
Showing 79 changed files with 2,328 additions and 1,534 deletions.
2 changes: 1 addition & 1 deletion .circleci/cache-version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Bump this version to force CI to re-create the cache from scratch.

09-3-23
09-22-23
63 changes: 26 additions & 37 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ mainBuildFilters: &mainBuildFilters
- 'feature/experimental-retries'
- 'publish-binary'
- 'chore/update_electron25_and_node18'
- 'lerna-optimize-tasks'

# usually we don't build Mac app - it takes a long time
# but sometimes we want to really confirm we are doing the right thing
Expand All @@ -44,6 +45,12 @@ macWorkflowFilters: &darwin-workflow-filters
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'feature/experimental-retries', << pipeline.git.branch >> ]
- equal: [ 'chore/update_webpack_deps_to_latest_webpack4_compat', << pipeline.git.branch >> ]
- equal: [ 'lerna-optimize-tasks', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>

linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
when:
or:
Expand All @@ -53,6 +60,9 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
- equal: [ 'feature/experimental-retries', << pipeline.git.branch >> ]
- equal: [ 'publish-binary', << pipeline.git.branch >> ]
- equal: [ 'chore/update_electron25_and_node18', << pipeline.git.branch >> ]
- equal: [ 'chore/update_webpack_deps_to_latest_webpack4_compat', << pipeline.git.branch >> ]
- equal: [ 'chore/bump_loaders_and_optimize_webpack', << pipeline.git.branch >> ]
- equal: [ 'lerna-optimize-tasks', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -76,6 +86,8 @@ windowsWorkflowFilters: &windows-workflow-filters
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'feature/experimental-retries', << pipeline.git.branch >> ]
- equal: [ 'chore/update_webpack_deps_to_latest_webpack4_compat', << pipeline.git.branch >> ]
- equal: [ 'lerna-optimize-tasks', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -145,7 +157,7 @@ commands:
name: Set environment variable to determine whether or not to persist artifacts
command: |
echo "Setting SHOULD_PERSIST_ARTIFACTS variable"
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "publish-binary" && "$CIRCLE_BRANCH" != "update-v8-snapshot-cache-on-develop" && "$CIRCLE_BRANCH" != "feature/experimental-retries" ]]; then
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "publish-binary" && "$CIRCLE_BRANCH" != "lerna-optimize-tasks" && "$CIRCLE_BRANCH" != "feature/experimental-retries" ]]; then
export SHOULD_PERSIST_ARTIFACTS=true
fi' >> "$BASH_ENV"
# You must run `setup_should_persist_artifacts` command and be using bash before running this command
Expand Down Expand Up @@ -222,10 +234,9 @@ commands:
description: Save entire folder as artifact for other jobs to run without reinstalling
steps:
- run:
name: Build all codegen
name: Sync Cloud Validations
command: |
source ./scripts/ensure-node.sh
yarn gulp buildProd
yarn gulp syncCloudValidations
- run:
name: Build packages
Expand Down Expand Up @@ -1057,25 +1068,6 @@ commands:
name: "Waiting on Circle CI jobs: <<parameters.job-names>>"
command: node ./scripts/wait-on-circle-jobs.js --job-names="<<parameters.job-names>>"

build-binary:
steps:
- run:
name: Build the Cypress binary
no_output_timeout: "45m"
command: |
source ./scripts/ensure-node.sh
node --version
if [[ `node ./scripts/get-platform-key.js` == 'linux-arm64' ]]; then
# these are missing on Circle and there is no way to pre-install them on Arm
sudo apt-get update
sudo apt-get install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
DISABLE_SNAPSHOT_REQUIRE=1 yarn binary-build --version $(node ./scripts/get-next-version.js) --createTar
else
yarn binary-build --version $(node ./scripts/get-next-version.js) --createTar
fi
- store_artifacts:
path: cypress-dist.tgz

check-if-binary-exists:
steps:
- run:
Expand Down Expand Up @@ -1193,11 +1185,7 @@ commands:
name: Build NPM package
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
yarn lerna run build-cli
- run:
command: ls -la types
working_directory: cli/build
Expand Down Expand Up @@ -1532,6 +1520,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 build --concurrency 4
# run unit tests from each individual package
- run: yarn test
# run type checking for each individual package
Expand Down Expand Up @@ -1915,7 +1904,7 @@ jobs:
- restore_cached_workspace
- run:
name: Build
command: yarn workspace @cypress/webpack-preprocessor build
command: yarn lerna run build --scope @cypress/webpack-preprocessor
- run:
name: Run tests
command: yarn workspace @cypress/webpack-preprocessor test
Expand Down Expand Up @@ -1973,7 +1962,7 @@ jobs:
- restore_cached_workspace
- run:
name: Build
command: yarn workspace @cypress/angular build
command: yarn lerna run build --scope @cypress/angular
- store-npm-logs

npm-react:
Expand All @@ -1982,7 +1971,7 @@ jobs:
- restore_cached_workspace
- run:
name: Build
command: yarn workspace @cypress/react build
command: yarn lerna run build --scope @cypress/react
- run:
name: Run tests
command: yarn test
Expand All @@ -1999,7 +1988,7 @@ jobs:
- restore_cached_workspace
- run:
name: Build
command: yarn workspace @cypress/vite-plugin-cypress-esm build
command: yarn lerna run build --scope @cypress/vite-plugin-cypress-esm
- run:
name: Run tests
command: yarn test
Expand All @@ -2016,7 +2005,7 @@ jobs:
- restore_cached_workspace
- run:
name: Build
command: yarn workspace @cypress/mount-utils build
command: yarn lerna run build --scope @cypress/mount-utils
- store-npm-logs

npm-grep:
Expand All @@ -2038,7 +2027,7 @@ jobs:
resource_class: small
steps:
- restore_cached_workspace
- run: yarn workspace create-cypress-tests build
- run: yarn lerna run build --scope create-cypress-tests

npm-eslint-plugin-dev:
<<: *defaults
Expand All @@ -2055,8 +2044,7 @@ jobs:
- run:
name: Build + Install
command: |
yarn workspace @cypress/schematic build
working_directory: npm/cypress-schematic
yarn lerna run build --scope @cypress/schematic
- run:
name: Run unit tests
command: |
Expand Down Expand Up @@ -2105,7 +2093,6 @@ jobs:
- restore_cached_workspace
- check-if-binary-exists
- setup_should_persist_artifacts
- build-binary
- trigger-publish-binary-pipeline

get-published-artifacts:
Expand Down Expand Up @@ -2399,10 +2386,12 @@ jobs:

test-binary-against-recipes:
<<: *defaults
parallelism: 4
steps:
- test-binary-against-repo:
repo: cypress-example-recipes
command: npm run test:ci
# Split the specs up across 4 different machines to run in parallel
command: npm run test:ci -- --chunk $CIRCLE_NODE_INDEX --total-chunks $CIRCLE_NODE_TOTAL
browser: electron

# This is a special job. It allows you to test the current
Expand Down
49 changes: 49 additions & 0 deletions .yarnclean
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# test directories
__tests__
test
tests
powered-test

# asset directories
docs
doc
# yaml package has a `doc` folder that we need
!yaml/**/doc/*
website
images
assets
!mochawesome-report-generator/dist/assets

# examples
example
!@packages/example
examples

# code coverage directories
coverage
.nyc_output

# build scripts
Makefile
Gulpfile.js
Gruntfile.js

# configs
appveyor.yml
circle.yml
codeship-services.yml
codeship-steps.yml
wercker.yml
.tern-project
.gitattributes
.editorconfig
.*ignore
.eslintrc
.jshintrc
.flowconfig
.documentup.json
.yarn-metadata.json
.travis.yml

# misc
*.md
4 changes: 2 additions & 2 deletions browser-versions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"chrome:beta": "118.0.5993.11",
"chrome:stable": "117.0.5938.88",
"chrome:beta": "118.0.5993.21",
"chrome:stable": "117.0.5938.132",
"chrome:minimum": "64.0.3282.0"
}
2 changes: 2 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ _Released 10/03/2023 (PENDING)_
**Bugfixes:**

- Fixed an issue where requests were correlated in the wrong order in the proxy. This could cause an issue where the wrong request is used for `cy.intercept` or assets (e.g. stylesheets or images) may not properly be available in Test Replay. Addressed in [#27892](https://github.com/cypress-io/cypress/pull/27892).
- Fixed an issue where a crashed Chrome renderer can cause the Test Replay recorder to hang. Addressed in [#27909](https://github.com/cypress-io/cypress/pull/27909).
- Fixed an issue where multiple responses yielded from calls to `cy.wait()` would sometimes be out of order. Fixes [#27337](https://github.com/cypress-io/cypress/issues/27337).

## 13.3.0

Expand Down
18 changes: 17 additions & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"clean": "node ./scripts/clean.js",
"prebuild": "yarn postinstall && node ./scripts/start-build.js",
"build": "node ./scripts/build.js",
"build-cli": "node ./scripts/build.js && 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}\";",
Expand Down Expand Up @@ -176,5 +176,21 @@
"nohoist": [
"@types/*"
]
},
"nx": {
"targets": {
"build-cli": {
"dependsOn": [
"prebuild"
],
"outputs": [
"{projectRoot}/types",
"{projectRoot}/build"
]
}
},
"implicitDependencies": [
"@cypress/*"
]
}
}
2 changes: 1 addition & 1 deletion guides/building-release-artifacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This guide has instructions for building both.
Building a new npm package is two commands:

1. Increment the version in the root `package.json`
2. `yarn build --scope cypress`
2. `yarn lerna run build-cli`

The steps above:

Expand Down
10 changes: 9 additions & 1 deletion npm/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"prebuild": "rimraf dist",
"build": "rollup -c rollup.config.mjs",
"postbuild": "node ../../scripts/sync-exported-npm-with-cli.js",
"build-prod": "yarn build",
"check-ts": "tsc --noEmit",
"lint": "eslint --ext .js,.ts,.json, ."
},
Expand Down Expand Up @@ -59,6 +58,15 @@
"publishConfig": {
"access": "public"
},
"nx": {
"targets": {
"build": {
"outputs": [
"{workspaceRoot}/cli/angular"
]
}
}
},
"standard": {
"globals": [
"Cypress",
Expand Down
6 changes: 3 additions & 3 deletions npm/create-cypress-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"main": "dist/src/main.js",
"scripts": {
"build": "yarn prepare-example && tsc -p ./tsconfig.json && node scripts/example copy-to ./dist/initial-template && yarn prepare-copy-templates",
"build-prod": "yarn build",
"prepare-example": "node scripts/example copy-to ./initial-template",
"prepare-copy-templates": "node scripts/copy-templates copy-to ./dist/src",
"test": "cross-env TS_NODE_PROJECT=./tsconfig.test.json mocha --config .mocharc.json './src/**/*.test.ts'",
Expand All @@ -23,14 +22,15 @@
"commander": "6.2.1",
"find-up": "5.0.0",
"fs-extra": "^9.1.0",
"inquirer": "7.3.3",
"glob": "^7.1.6",
"inquirer": "8.2.4",
"ora": "^5.1.0",
"recast": "0.20.4",
"semver": "7.3.7"
},
"devDependencies": {
"@types/babel__core": "^7.1.2",
"@types/inquirer": "7.3.1",
"@types/inquirer": "8.2.4",
"@types/mock-fs": "4.10.0",
"@types/node": "18.17.5",
"@types/ora": "^3.2.0",
Expand Down
11 changes: 11 additions & 0 deletions npm/cypress-schematic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,16 @@
"ng-add": {
"save": "devDependencies"
},
"nx": {
"targets": {
"build": {
"outputs": [
"{projectRoot}/src/**/*.js",
"{projectRoot}/src/**/*.d.ts",
"{projectRoot}/src/**/*.js.map"
]
}
}
},
"schematics": "./src/schematics/collection.json"
}
5 changes: 5 additions & 0 deletions npm/grep/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,10 @@
],
"publishConfig": {
"access": "public"
},
"nx": {
"implicitDependencies": [
"!cypress"
]
}
}
Loading

0 comments on commit eb794a3

Please sign in to comment.