Skip to content

Commit

Permalink
Merge branch 'develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthemanuel committed May 7, 2024
2 parents c7fab88 + d875569 commit 5f90833
Show file tree
Hide file tree
Showing 204 changed files with 4,641 additions and 2,081 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.

04-15-24-macstadium-3
04-22-24
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ orbs:

jobs:
verify-ci-should-run:
resource_class: small
docker:
- image: cimg/node:current
steps:
Expand Down
90 changes: 36 additions & 54 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ mainBuildFilters: &mainBuildFilters
- develop
- /^release\/\d+\.\d+\.\d+$/
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- 'cacie/dep/electron-27'
- 'feat/protocol_shadow_dom_support'
- 'publish-binary'
- 'em/circle2'
- 'update-v8-snapshot-cache-on-develop'

# 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 @@ -43,9 +40,7 @@ macWorkflowFilters: &darwin-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# 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: [ 'cacie/dep/electron-27', << pipeline.git.branch >> ]
- equal: [ 'feat/protocol_shadow_dom_support', << pipeline.git.branch >> ]
- equal: [ 'feat/support_wds5', << pipeline.git.branch >> ]
- equal: [ 'bump-electron-27.3.10', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -56,9 +51,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# 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: [ 'cacie/dep/electron-27', << pipeline.git.branch >> ]
- equal: [ 'feat/support_wds5', << pipeline.git.branch >> ]
- equal: [ 'em/circle2', << pipeline.git.branch >> ]
- equal: [ 'bump-electron-27.3.10', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -81,10 +74,7 @@ windowsWorkflowFilters: &windows-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# 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: [ 'cacie/dep/electron-27', << pipeline.git.branch >> ]
- equal: [ 'feat/protocol_shadow_dom_support', << pipeline.git.branch >> ]
- equal: [ 'lerna-optimize-tasks', << pipeline.git.branch >> ]
- equal: [ 'feat/support_wds5', << pipeline.git.branch >> ]
- equal: [ 'chore/update_internal_browser_images', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -93,7 +83,7 @@ executors:
# the Docker image with Cypress dependencies and Chrome browser
cy-doc:
docker:
- image: cypress/browsers-internal:node18.17.1-chrome118-ff115
- image: cypress/browsers-internal:node18.17.1-chrome124-ff125
# by default, we use "medium" to balance performance + CI costs. bump or reduce on a per-job basis if needed.
resource_class: medium
environment:
Expand All @@ -103,7 +93,7 @@ executors:
# Docker image with non-root "node" user
non-root-docker-user:
docker:
- image: cypress/browsers-internal:node18.17.1-chrome118-ff115
- image: cypress/browsers-internal:node18.17.1-chrome124-ff125
user: node
environment:
PLATFORM: linux
Expand Down Expand Up @@ -151,7 +141,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" != "feat/protocol_shadow_dom_support" && "$CIRCLE_BRANCH" != "feat/support_wds5" ]]; then
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "bump-electron-27.3.10" ]]; 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 @@ -663,37 +653,21 @@ commands:
browser: <<parameters.browser>>
- run:
command: |
if [[ $PLATFORM == 'windows' && '<<parameters.browser>>' == 'chrome' && '<<parameters.package>>' == 'app' && '<<parameters.type>>' == 'e2e' ]]; then
IS_WINDOWS_APP_INTEGRATION_TEST=true
else
IS_WINDOWS_APP_INTEGRATION_TEST=false
fi
echo Current working directory is $PWD
echo Total containers $CIRCLE_NODE_TOTAL
if [[ -v MAIN_RECORD_KEY ]]; then
if [[ <<parameters.package>> == 'app' && <<parameters.type>> == 'e2e' ]]; then
export DEBUG=cypress:*
fi
# internal PR
cmd=$([[ <<parameters.percy>> == 'true' ]] && echo 'yarn percy exec --parallel -- --') || true
if [[ "$IS_WINDOWS_APP_INTEGRATION_TEST" = true ]]; then
echo "on windows running app-integration tests. Skipping flaky tests"
# if windows app integration tests, skip some very flaky tests that fail to load for undetermined reasons
TESTFILES=$(cd packages/<<parameters.package>> && /usr/bin/find cypress/e2e -regextype posix-extended -name '*.cy.*' -not -regex '.*(experimentalRetries|reporter.command_errors|ct-framework-errors|reporter-ct-vite|reporter-ct-webpack|reporter.errors|reporter.hooks|cypress-in-cypress|runner.ui|specs|studio).*' | circleci tests split --total=$CIRCLE_NODE_TOTAL)
# Do NOT record on windows packages/app due to encryption issues
$cmd yarn workspace @packages/<<parameters.package>> cypress:run:<<parameters.type>> --browser <<parameters.browser>> --spec $TESTFILES
else
DEBUG=<<parameters.debug>> \
CYPRESS_CONFIG_ENV=production \
CYPRESS_RECORD_KEY=$MAIN_RECORD_KEY \
PERCY_PARALLEL_NONCE=$CIRCLE_WORKFLOW_WORKSPACE_ID \
PERCY_ENABLE=${PERCY_TOKEN:-0} \
PERCY_PARALLEL_TOTAL=-1 \
CYPRESS_INTERNAL_ENABLE_TELEMETRY="true" \
$cmd yarn workspace @packages/<<parameters.package>> cypress:run:<<parameters.type>> --browser <<parameters.browser>> --record --parallel --group <<parameters.package>>-<<parameters.type>>
fi
DEBUG=<<parameters.debug>> \
CYPRESS_CONFIG_ENV=production \
CYPRESS_RECORD_KEY=$MAIN_RECORD_KEY \
PERCY_PARALLEL_NONCE=$CIRCLE_WORKFLOW_WORKSPACE_ID \
PERCY_ENABLE=${PERCY_TOKEN:-0} \
PERCY_PARALLEL_TOTAL=-1 \
CYPRESS_INTERNAL_ENABLE_TELEMETRY="true" \
$cmd yarn workspace @packages/<<parameters.package>> cypress:run:<<parameters.type>> --browser <<parameters.browser>> --record --parallel --group <<parameters.package>>-<<parameters.type>>
else
# external PR
Expand All @@ -714,12 +688,6 @@ commands:
# To run the `yarn` command, we need to walk out of the package folder.
cd ../..
if [[ "$IS_WINDOWS_APP_INTEGRATION_TEST" = true ]]; then
echo "on windows running app-integration tests. Skipping flaky tests"
# if windows app integration tests, skip some very flaky tests that fail to load for undetermined reasons
TESTFILES=$(cd packages/<<parameters.package>> && /usr/bin/find cypress/e2e -regextype posix-extended -name '*.cy.*' -not -regex '.*(experimentalRetries|reporter.command_errors|ct-framework-errors|reporter-ct-vite|reporter-ct-webpack|reporter.errors|reporter.hooks|cypress-in-cypress|runner.ui|specs|studio).*' | circleci tests split --total=$CIRCLE_NODE_TOTAL)
fi
DEBUG=<<parameters.debug>> \
CYPRESS_CONFIG_ENV=production \
PERCY_PARALLEL_NONCE=$CIRCLE_WORKFLOW_WORKSPACE_ID \
Expand Down Expand Up @@ -1444,6 +1412,7 @@ jobs:

check-ts:
<<: *defaults
resource_class: small
steps:
- restore_cached_workspace
- install-required-node
Expand Down Expand Up @@ -1748,27 +1717,31 @@ jobs:

system-tests-chrome:
<<: *defaults
resource_class: medium+
parallelism: 8
steps:
- run-system-tests:
browser: chrome

system-tests-electron:
<<: *defaults
resource_class: medium+
parallelism: 8
steps:
- run-system-tests:
browser: electron

system-tests-firefox:
<<: *defaults
resource_class: medium+
parallelism: 8
steps:
- run-system-tests:
browser: firefox

system-tests-webkit:
<<: *defaults
resource_class: medium+
parallelism: 8
steps:
- run-system-tests:
Expand Down Expand Up @@ -1826,7 +1799,7 @@ jobs:
<<: *defaultsParameters
resource_class:
type: string
default: medium
default: large
percy:
type: boolean
default: false
Expand All @@ -1843,6 +1816,9 @@ jobs:
<<: *defaults
parameters:
<<: *defaultsParameters
resource_class:
type: string
default: medium+
percy:
type: boolean
default: false
Expand All @@ -1860,7 +1836,7 @@ jobs:
<<: *defaultsParameters
resource_class:
type: string
default: medium
default: large
percy:
type: boolean
default: false
Expand All @@ -1876,13 +1852,15 @@ jobs:
driver-integration-tests-chrome:
<<: *defaults
parallelism: 5
resource_class: medium+
steps:
- run-driver-integration-tests:
browser: chrome
install-chrome-channel: stable

driver-integration-tests-chrome-beta:
<<: *defaults
resource_class: medium+
parallelism: 5
steps:
- run-driver-integration-tests:
Expand All @@ -1891,6 +1869,7 @@ jobs:

driver-integration-tests-firefox:
<<: *defaults
resource_class: medium+
parallelism: 5
steps:
- run-driver-integration-tests:
Expand All @@ -1905,7 +1884,7 @@ jobs:

driver-integration-tests-webkit:
<<: *defaults
resource_class: medium+
resource_class: large
parallelism: 5
steps:
- run-driver-integration-tests:
Expand All @@ -1928,6 +1907,7 @@ jobs:

reporter-integration-tests:
<<: *defaults
resource_class: medium+
parallelism: 3
steps:
- restore_cached_workspace
Expand All @@ -1953,6 +1933,7 @@ jobs:

run-webpack-dev-server-integration-tests:
<<: *defaults
resource_class: medium+
parallelism: 2
steps:
- restore_cached_workspace
Expand Down Expand Up @@ -2223,7 +2204,7 @@ jobs:
<<: *defaultsParameters
resource_class:
type: string
default: large
default: medium
resource_class: << parameters.resource_class >>
steps:
- maybe_skip_binary_jobs
Expand Down Expand Up @@ -2322,6 +2303,7 @@ jobs:

test-npm-module-and-verify-binary:
<<: *defaults
resource_class: small
steps:
- restore_cached_workspace
# make sure we have cypress.zip received
Expand Down Expand Up @@ -3458,7 +3440,7 @@ windows-workflow: &windows-workflow
- node_modules_install:
name: windows-node-modules-install
executor: windows
resource_class: windows.large
resource_class: windows.medium
only-cache-for-root-user: true

- build:
Expand All @@ -3472,15 +3454,15 @@ windows-workflow: &windows-workflow
- run-app-integration-tests-chrome:
name: windows-run-app-integration-tests-chrome
executor: windows
resource_class: windows.xlarge
resource_class: windows.large
context: [test-runner:cypress-record-key, test-runner:launchpad-tests]
requires:
- windows-build

- run-launchpad-integration-tests-chrome:
name: windows-run-launchpad-integration-tests-chrome
executor: windows
resource_class: windows.xlarge
resource_class: windows.large
context: [test-runner:cypress-record-key, test-runner:launchpad-tests]
requires:
- windows-build
Expand Down
9 changes: 5 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,14 @@ module.exports = {
'no-restricted-syntax': 'off',
},
},
{
files: ['*.json'],
extends: 'plugin:@cypress/dev/general',
},
],
rules: {
'no-duplicate-imports': 'off',
'import/no-duplicates': 'off',
'@typescript-eslint/no-duplicate-imports': [
'error',
],
'import/no-duplicates': 'error',
'prefer-spread': 'off',
'prefer-rest-params': 'off',
'no-useless-constructor': 'off',
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/update-browser-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
env:
CYPRESS_BOT_APP_ID: ${{ secrets.CYPRESS_BOT_APP_ID }}
BASE_BRANCH: develop
# Prevent from running this workflow on forks
if: github.repository == 'cypress-io/cypress'
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/update_v8_snapshot_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@ on:
push:
branches:
- 'release/**'
paths-ignore:
- .husky/**
- .vscode/**
- .eslintrc.js
- .gitattributes
- .gitignore
- .percy.yml
- .prettierignore
- .releaserc.js
- .yarnclean
- CHANGELOG.md
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- LICENSE
- README.md
- ROADMAP.md
- SECURITY.md
workflow_dispatch:
inputs:
branch:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/upload_release_asset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
FOSSA_API_KEY: ${{secrets.FOSSAAPIKEY}}
repo-token: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- name: Check out repository code
uses: actions/checkout@v4
Expand Down
8 changes: 6 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,12 @@ You must have the following installed on your system to contribute locally:
`python` is pre-installed on Debian-based systems including Ubuntu.
The Python versions shipped with Ubuntu versions `20.04`, `23.10` and `22.04` are compatible with Cypress requirements.

Only on Ubuntu `24.04` install Python `3.11` by executing the following command:
Only on Ubuntu `24.04` install Python `3.11` by executing the following commands:

```shell
sudo apt install python3.11
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.11
```

Add the environment variable `NODE_GYP_FORCE_PYTHON` to `~/.bashrc`:
Expand All @@ -225,6 +227,8 @@ Add the environment variable `NODE_GYP_FORCE_PYTHON` to `~/.bashrc`:
export NODE_GYP_FORCE_PYTHON=/usr/bin/python3.11
```

For Ubuntu `24.04` refer also to the [Release notes](https://discourse.ubuntu.com/t/noble-numbat-release-notes/39890) in the section [Unprivileged user namespace restrictions](https://discourse.ubuntu.com/t/noble-numbat-release-notes/39890#unprivileged-user-namespace-restrictions-15) and apply one of the workarounds to disable unprivileged user namespace restrictions for the entire system, either for one boot or persistently, as described. If you do not do this you may receive an error which includes the text `FATAL:setuid_sandbox_host.cc` when you try to run Cypress on this version of Ubuntu after building Cypress from source.

#### Windows

When installing the Visual Studio C++ environment recommended by [node-gyp](https://github.com/nodejs/node-gyp), install also a Windows 10 SDK. The currently used version of `node-gyp` may otherwise fail to recognise the Visual Studio installation.
Expand Down
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": "124.0.6367.18",
"chrome:stable": "123.0.6312.86",
"chrome:beta": "125.0.6422.26",
"chrome:stable": "124.0.6367.118",
"chrome:minimum": "64.0.3282.0"
}

0 comments on commit 5f90833

Please sign in to comment.