From e66e7780ff92cf5683dc59bd27b53bb835d6c6ca Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Tue, 9 Sep 2025 13:54:23 -0400 Subject: [PATCH 01/26] add husky script to build circleci yml files --- .husky/pre-commit | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.husky/pre-commit b/.husky/pre-commit index 36af219892f..7db2d773612 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,11 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" +# Pack CircleCI config if any files in pull-request were changed +if git diff --cached --name-only | grep -q "^\.circleci/workflows-src/"; then + echo "Packing CircleCI configuration..." + circleci config pack ./.circleci/workflows-src > ./.circleci/workflows.yml + git add ./.circleci/workflows.yml +fi + npx lint-staged From bf75cda1b717628a72b4b57c4b7d745b970456b1 Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Tue, 9 Sep 2025 13:54:49 -0400 Subject: [PATCH 02/26] add circleci cli as a required tool for working with .circleci --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7d520ed15a6..89641233eac 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -237,6 +237,7 @@ You must have the following installed on your system to contribute locally: - [`Node.js`](https://nodejs.org/en/) (See the root [.node-version](.node-version) file for the required version. You can find a list of tools on [node-version-usage](https://github.com/shadowspawn/node-version-usage) to switch the version of [`Node.js`](https://nodejs.org/en/) based on [.node-version](.node-version).) - [`Yarn v1 Classic`](https://yarnpkg.com/en/docs/install) (See also [Corepack](#corepack) below.) - [`python`](https://www.python.org/downloads/) (since we use `node-gyp`. See their [repo](https://github.com/nodejs/node-gyp) for Python version requirements.) +- [`circleci CLI`](https://circleci.com/docs/guides/toolkit/local-cli/) if you intend on editing the CI configuration. #### Debian/Ubuntu From b1aeba4557ee889e403ac8fce80b813c8a6f1326 Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Tue, 9 Sep 2025 13:55:29 -0400 Subject: [PATCH 03/26] break the original workflows.yml file into separate pieces, using circleci config pack to compose them into the main workflows.yml file --- .circleci/README.md | 57 + .circleci/workflows-src/@main.yml | 2793 +++++++ .circleci/workflows-src/workflows/@main.yml | 1053 +++ .../workflows-src/workflows/pull-request.yml | 310 + .circleci/workflows.yml | 7141 ++++++++++------- 5 files changed, 8369 insertions(+), 2985 deletions(-) create mode 100644 .circleci/README.md create mode 100644 .circleci/workflows-src/@main.yml create mode 100644 .circleci/workflows-src/workflows/@main.yml create mode 100644 .circleci/workflows-src/workflows/pull-request.yml diff --git a/.circleci/README.md b/.circleci/README.md new file mode 100644 index 00000000000..ff147588b02 --- /dev/null +++ b/.circleci/README.md @@ -0,0 +1,57 @@ +# CircleCI Configuration + +This directory contains CircleCI configuration files that are automatically generated and updated. + +## Prerequisites + +### CircleCI Local CLI + +The CircleCI Local CLI is required to generate the `pull-request.yml` file from the source configuration. + +**Installation:** + +- **macOS (Homebrew):** + ```bash + brew install circleci + ``` + +- **Linux:** + ```bash + curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh | bash + ``` + +- **Windows:** + ```bash + choco install circleci-cli + ``` + +- **Manual installation:** + Download from [CircleCI Local CLI releases](https://github.com/CircleCI-Public/circleci-cli/releases) + +For more detailed installation instructions, see the [CircleCI Local CLI documentation](https://circleci.com/docs/2.0/local-cli/). + +## Lint-Staged Rules + +When files in this directory are modified, the following lint-staged rule will automatically run: + +```bash +circleci config pack .circleci/workflows-src > .circleci/workflows.yml +``` + +This command: +1. Takes the source configuration from `./.circleci/workflows-src/` +2. Packs it into a single YAML file +3. Outputs the result to `./circleci/workflows.yml` + +## File Structure + +- `workflows-src/` - Source configuration files (modify these) +- `workflows.yml` - Generated configuration file (auto-generated, do not edit manually) + +## Development Workflow + +1. Make changes to files in `workflows-src/` +2. The lint-staged hook will automatically regenerate `workflows.yml` and stage it +3. Commit both the source changes and the generated file + +**Note:** Always commit both the source files and the generated `workflows.yml` file together to ensure the CircleCI configuration stays in sync. \ No newline at end of file diff --git a/.circleci/workflows-src/@main.yml b/.circleci/workflows-src/@main.yml new file mode 100644 index 00000000000..1a82348309b --- /dev/null +++ b/.circleci/workflows-src/@main.yml @@ -0,0 +1,2793 @@ +version: 2.1 + +chrome-stable-version: &chrome-stable-version "140.0.7339.80" +chrome-beta-version: &chrome-beta-version "140.0.7339.41" +firefox-stable-version: &firefox-stable-version "142.0" + +orbs: + browser-tools: circleci/browser-tools@2.1.1 + +defaults: &defaults + parallelism: 1 + working_directory: ~/cypress + parameters: &defaultsParameters + executor: + type: executor + default: cy-doc + only-cache-for-root-user: + type: boolean + default: false + executor: <> + environment: + ## set specific timezone + &defaultsEnvironment + TZ: "/usr/share/zoneinfo/America/New_York" + + ## store artifacts here + CIRCLE_ARTIFACTS: /tmp/artifacts + + ## set so that e2e tests are consistent + COLUMNS: 100 + LINES: 24 + +executors: + # the Docker image with Cypress dependencies and Chrome browser + cy-doc: + docker: + - image: cypress/base-internal:22.15.1-bullseye + # by default, we use "medium" to balance performance + CI costs. bump or reduce on a per-job basis if needed. + resource_class: medium + environment: + PLATFORM: linux + + kitchensink-executor: + docker: + - image: cypress/base-internal:22.15.1-bullseye + # by default, we use "medium" to balance performance + CI costs. bump or reduce on a per-job basis if needed. + resource_class: medium + environment: + PLATFORM: linux + + # Docker image with non-root "node" user + non-root-docker-user: + docker: + - image: cypress/base-internal:22.15.1-bullseye + user: node + environment: + PLATFORM: linux + + # executor to run on Mac OS + # https://circleci.com/docs/2.0/executor-types/#using-macos + # https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions + darwin-amd64: + machine: true + environment: + PLATFORM: darwin + + # executor to run on Windows - based off of the windows-orb default executor since it is + # not customizable enough to align with our existing setup. + # https://github.com/CircleCI-Public/windows-orb/blob/master/src/executors/default.yml + # https://circleci.com/docs/2.0/hello-world-windows/#software-pre-installed-in-the-windows-image + windows: &windows-executor + machine: + image: windows-server-2022-gui:stable + shell: bash.exe -eo pipefail + resource_class: windows.large + environment: + PLATFORM: windows + + darwin-arm64: &darwin-arm64-executor + machine: true + environment: + PLATFORM: darwin + + linux-arm64: &linux-arm64-executor + machine: + image: ubuntu-2004:2024.11.1 + resource_class: arm.medium + environment: + PLATFORM: linux + # TODO: Disabling snapshots for now on Linux Arm 64 architectures. Will revisit with https://github.com/cypress-io/cypress/issues/23557 + DISABLE_SNAPSHOT_REQUIRE: 1 + +commands: + # This command inserts SHOULD_PERSIST_ARTIFACTS into BASH_ENV. This way, we can define the variable in one place and use it in multiple steps. + # Run this command in a job before you want to use the SHOULD_PERSIST_ARTIFACTS variable. + setup_should_persist_artifacts: + steps: + - run: + 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" != "chore/refactor_cli_to_ts" ]]; 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 + verify_should_persist_artifacts: + steps: + - run: + name: Check current branch to persist artifacts + command: | + if [[ -z "$SHOULD_PERSIST_ARTIFACTS" ]]; then + echo "Not uploading artifacts or posting install comment for this branch." + circleci-agent step halt + fi + + maybe_skip_binary_jobs: + steps: + - run: + name: Skip binary job if external PR + command: | + if [[ -z "$CIRCLE_TOKEN" ]]; then + echo "There is no CIRCLE_TOKEN set for this job. Cannot trigger binary build. Skipping job." + circleci-agent step halt + fi + + restore_workspace_binaries: + steps: + - attach_workspace: + at: ~/ + # make sure we have cypress.zip received + - run: ls -l + - run: ls -l cypress.zip cypress.tgz + - run: node --version + - run: npm --version + + restore_cached_workspace: + steps: + - attach_workspace: + at: ~/ + - install-required-node + - unpack-dependencies + + restore_cached_binary: + steps: + - attach_workspace: + at: ~/ + + prepare-modules-cache: + parameters: + dont-move: + type: boolean + default: false + steps: + - run: node scripts/circle-cache.js --action prepare + - unless: + condition: << parameters.dont-move >> + steps: + - run: + name: Move to /tmp dir for consistent caching across root/non-root users + command: | + mkdir -p /tmp/node_modules_cache + mv ~/cypress/node_modules /tmp/node_modules_cache/root_node_modules + mv ~/cypress/cli/node_modules /tmp/node_modules_cache/cli_node_modules + mv ~/cypress/system-tests/node_modules /tmp/node_modules_cache/system-tests_node_modules + mv ~/cypress/globbed_node_modules /tmp/node_modules_cache/globbed_node_modules + + install-webkit-deps: + steps: + - run: + name: Install WebKit dependencies + command: | + npx playwright install webkit + npx playwright install-deps webkit + + build-and-persist: + description: Save entire folder as artifact for other jobs to run without reinstalling + steps: + - run: + name: Sync Cloud Validations + command: | + source ./scripts/ensure-node.sh + yarn gulp syncCloudValidations + - run: + name: Build packages + command: | + source ./scripts/ensure-node.sh + yarn build + - run: + name: Generate v8 snapshot + command: | + source ./scripts/ensure-node.sh + # Minification takes some time. We only really need to do that for the binary (and we regenerate snapshots separately there) + V8_UPDATE_METAFILE=1 V8_SNAPSHOT_DISABLE_MINIFY=1 yarn build-v8-snapshot-prod + - prepare-modules-cache # So we don't throw these in the workspace cache + - persist_to_workspace: + root: ~/ + paths: + - cypress + + install_cache_helpers_dependencies: + steps: + - run: + # Dependencies needed by circle-cache.js, before we "yarn" or unpack cached node_modules + name: Cache Helper Dependencies + working_directory: ~/ + command: npm i glob@7.1.6 fs-extra@10.0.0 minimist@1.2.5 + fast-json-stable-stringify@2.1.0 + + unpack-dependencies: + description: 'Unpacks dependencies associated with the current workflow' + steps: + - install_cache_helpers_dependencies + - run: + name: Generate Circle Cache Key + command: node scripts/circle-cache.js --action cacheKey > circle_cache_key + - run: + name: Generate platform key + command: node ./scripts/get-platform-key.js > platform_key + - restore_cache: + name: Restore cache state, to check for known modules cache existence + key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" + }}-node-modules-cache-{{ checksum "circle_cache_key" }} + - run: + name: Move node_modules back from /tmp + command: | + if [[ -d "/tmp/node_modules_cache" ]]; then + mv /tmp/node_modules_cache/root_node_modules ~/cypress/node_modules + mv /tmp/node_modules_cache/cli_node_modules ~/cypress/cli/node_modules + mv /tmp/node_modules_cache/system-tests_node_modules ~/cypress/system-tests/node_modules + mv /tmp/node_modules_cache/globbed_node_modules ~/cypress/globbed_node_modules + rm -rf /tmp/node_modules_cache + fi + - run: + name: Restore all node_modules to proper workspace folders + command: node scripts/circle-cache.js --action unpack + + restore_cached_system_tests_deps: + description: 'Restore the cached node_modules for projects in + "system-tests/projects/**"' + steps: + - run: + name: Generate Circle Cache key for system tests + command: ./system-tests/scripts/cache-key.sh > system_tests_cache_key + - run: + name: Generate platform key + command: node ./scripts/get-platform-key.js > platform_key + - restore_cache: + name: Restore system tests node_modules cache + keys: + - v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum + "platform_key" }}-system-tests-projects-node-modules-cache-{{ + checksum "system_tests_cache_key" }} + + update_cached_system_tests_deps: + description: 'Update the cached node_modules for projects in "system-tests/projects/**"' + steps: + - run: + name: Generate Circle Cache key for system tests + command: ./system-tests/scripts/cache-key.sh > system_tests_cache_key + - run: + name: Generate platform key + command: node ./scripts/get-platform-key.js > platform_key + - restore_cache: + name: Restore cache state, to check for known modules cache existence + keys: + - v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum + "platform_key" + }}-state-of-system-tests-projects-node-modules-cache-{{ checksum + "system_tests_cache_key" }} + - run: + name: Bail if specific cache exists + command: | + if [[ -f "/tmp/system_tests_node_modules_installed" ]]; then + echo "No updates to system tests node modules, exiting" + circleci-agent step halt + fi + - restore_cache: + name: Restore system tests node_modules cache + keys: + - v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum + "platform_key" }}-system-tests-projects-node-modules-cache-{{ + checksum "system_tests_cache_key" }} + - v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum + "platform_key" }}-system-tests-projects-node-modules-cache- + - run: + name: Update system-tests node_modules cache + command: yarn workspace @tooling/system-tests projects:yarn:install + - save_cache: + name: Save system tests node_modules cache + key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" + }}-system-tests-projects-node-modules-cache-{{ checksum + "system_tests_cache_key" }} + paths: + - /tmp/cy-system-tests-node-modules + - run: touch /tmp/system_tests_node_modules_installed + - save_cache: + name: Save system tests node_modules cache state key + key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" + }}-state-of-system-tests-projects-node-modules-cache-{{ checksum + "system_tests_cache_key" }} + paths: + - /tmp/system_tests_node_modules_installed + + caching-dependency-installer: + description: 'Installs & caches the dependencies based on yarn lock & package + json dependencies' + parameters: + only-cache-for-root-user: + type: boolean + default: false + build-better-sqlite3: + type: boolean + default: false + steps: + - install_cache_helpers_dependencies + - run: + name: Generate Circle Cache Key + command: node scripts/circle-cache.js --action cacheKey > circle_cache_key + - run: + name: Generate platform key + command: node ./scripts/get-platform-key.js > platform_key + - when: + condition: <> + steps: + - restore_cache: + name: Restore cache state, to check for known modules cache existence + key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" + }}-state-of-node-modules-cache-{{ checksum "circle_cache_key" + }}-better-sqlite3 + - unless: + condition: <> + steps: + - restore_cache: + name: Restore cache state, to check for known modules cache existence + key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" + }}-state-of-node-modules-cache-{{ checksum "circle_cache_key" + }} + - run: + name: Bail if cache exists + command: | + if [[ -f "node_modules_installed" ]]; then + echo "Node modules already cached for dependencies, exiting" + circleci-agent step halt + fi + - run: date +%Y-%U > cache_date + - restore_cache: + name: Restore weekly yarn cache + keys: + - v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum + "platform_key" }}-deps-root-weekly-{{ checksum "cache_date" }} + - run: + name: Install Node Modules + command: | + if [[ `node ./scripts/get-platform-key.js` == 'linux-arm64' ]]; then + # Building better-sqlite3 on arm64 requires gcc-10 + # on Arm, CI runs as non-root so we need to use sudo + sudo apt install gcc-10 g++-10 + + # Update default to gcc-10 and g++-10 + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 30 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 30 + sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 + sudo update-alternatives --set cc /usr/bin/gcc + sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30 + sudo update-alternatives --set c++ /usr/bin/g++ + sudo update-alternatives --config gcc + sudo update-alternatives --config g++ + + # If we are on arm64 we need to install setuptools as it no longer comes standard with the latest version of python + pip install setuptools + fi + source ./scripts/ensure-node.sh + # avoid installing Percy's Chromium every time we use @percy/cli + # https://docs.percy.io/docs/caching-asset-discovery-browser-in-ci + PERCY_POSTINSTALL_BROWSER=true \ + yarn --prefer-offline --frozen-lockfile --cache-folder ~/.yarn + no_output_timeout: 20m + - when: + condition: <> + steps: + - build-better-sqlite3 + - prepare-modules-cache: + dont-move: <> # we don't move, so we don't hit any issues unpacking symlinks + - when: + condition: <> # we don't move to /tmp since we don't need to worry about different users + steps: + - save_cache: + name: Saving node modules for root, cli, and all globbed workspace packages + key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" + }}-node-modules-cache-{{ checksum "circle_cache_key" }} + paths: + - node_modules + - cli/node_modules + - system-tests/node_modules + - globbed_node_modules + - unless: + condition: <> + steps: + - save_cache: + name: Saving node modules for root, cli, and all globbed workspace packages + key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" + }}-node-modules-cache-{{ checksum "circle_cache_key" }} + paths: + - /tmp/node_modules_cache + - run: touch node_modules_installed + - when: + condition: <> + steps: + - save_cache: + name: Saving node-modules cache state key + key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" + }}-state-of-node-modules-cache-{{ checksum "circle_cache_key" + }}-better-sqlite3 + paths: + - node_modules_installed + - unless: + condition: <> + steps: + - save_cache: + name: Saving node-modules cache state key + key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" + }}-state-of-node-modules-cache-{{ checksum "circle_cache_key" + }} + paths: + - node_modules_installed + - save_cache: + name: Save weekly yarn cache + key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" + }}-deps-root-weekly-{{ checksum "cache_date" }} + paths: + - ~/.yarn + - ~/.cy-npm-cache + + verify-build-setup: + description: Common commands run when setting up for build or yarn install + parameters: + executor: + type: executor + default: cy-doc + steps: + - run: pwd + ##- run: + ## name: print global yarn cache path and size + ## command: du -sh $(yarn global bin) + - run: + name: print yarn version + command: yarn versions + - unless: + condition: + # stop-only does not correctly match on windows: https://github.com/bahmutov/stop-only/issues/78 + equal: [ *windows-executor, << parameters.executor >> ] + steps: + - run: + name: Stop .only # this will catch ".only"s in js/coffee as well + command: | + source ./scripts/ensure-node.sh + yarn stop-only-all + - run: + name: Check terminal variables + ## make sure the TERM is set to 'xterm' in node (Linux only) + ## else colors (and tests) will fail + ## See the following information + ## * http://andykdocs.de/development/Docker/Fixing+the+Docker+TERM+variable+issue + ## * https://unix.stackexchange.com/questions/43945/whats-the-difference-between-various-term-variables + command: | + source ./scripts/ensure-node.sh + yarn check-terminal + + install-required-node: + # https://discuss.circleci.com/t/switch-nodejs-version-on-machine-executor-solved/26675/2 + description: Install Node version matching .node-version + steps: + - run: + name: Install Node + command: | + source ./scripts/ensure-node.sh + echo "Installing Yarn" + npm install yarn --location=global # ensure yarn is installed with the correct node engine + yarn check-node-version + - run: + name: Check Node + command: | + source ./scripts/ensure-node.sh + yarn check-node-version + + install-browsers: + description: Install Google Chrome or Firefox + parameters: + executor: + description: The executor in use. Only used if Windows for workaround purposes + type: executor + default: cy-doc + install-chrome: + description: whether or not to install google chrome + type: boolean + default: false + google-chrome-channel: + description: Google Chrome channel to install + type: string + # can be stable, beta, dev, or canary + default: stable + google-chrome-version: + description: Google Chrome version to install + type: string + # latest can also be used here + default: *chrome-stable-version + install-chrome-for-testing: + description: whether or not to install google chrome for testing + type: boolean + default: false + google-chrome-for-testing-version: + description: Google Chrome for Testing version to install + type: string + # latest can also be used here + default: *chrome-stable-version + install-firefox: + description: whether or not to install firefox + type: boolean + default: false + firefox-version: + description: Firefox version to install + type: string + # latest can also be used here + default: *firefox-stable-version + steps: + - when: + condition: + not: + equal: [ *windows-executor, << parameters.executor >> ] + # see https://circleci.com/developer/orbs/orb/circleci/browser-tools + steps: + - when: + condition: + equal: [ true, << parameters.install-firefox >> ] + steps: + - browser-tools/install_firefox: + # https://download-installer.cdn.mozilla.net/pub/firefox/releases/ + version: << parameters.firefox-version >> + - when: + condition: + equal: [ true, << parameters.install-chrome >> ] + steps: + - browser-tools/install_chrome: + # https://www.ubuntuupdates.org/package/google_chrome/stable/main/base/google-chrome-stable + channel: << parameters.google-chrome-channel >> + chrome_version: << parameters.google-chrome-version >> + - when: + condition: + equal: [ 'beta', << parameters.google-chrome-channel>> ] + steps: + - run: + # When the beta is downloaded with this orb, + # google-chrome-beta is linked in addition to google-chrome, + # which we do not expect and errors out when running Cypress + name: remove linked google-chrome binary + command: | + rm /usr/bin/google-chrome + - when: + condition: + equal: [ true, << parameters.install-chrome-for-testing >> ] + steps: + - run: + name: Install unzip + command: | + apt-get update && apt-get install -y unzip + - browser-tools/install_chrome_for_testing: + version: << parameters.google-chrome-for-testing-version >> + install_chromedriver: false + + # This code builds better-sqlite3 on Debian 11 (Bullseye). This is necessary because Debian 10 has the oldest glibc version (2.31) that we support. + # + # Since this is running Docker remote (because the job running the command may not be using an executor with the appropriate glibc version), we need to + # copy the project into the container, and copy the built plugin out of the container because the host running docker does not have access to the + # project directory so volume mounts are not possible. The built plugin is copied to the project directory so it can be injected into the final binary. + build-better-sqlite3: + description: Build better-sqlite3 for glibc 2.31 + steps: + - setup_remote_docker + - run: + name: Build better-sqlite3 for glibc 2.31 + command: | + if [[ ! -f better_sqlite3.node ]]; then + set -x + apt update && apt install -y docker.io + docker run -d --name better-sqlite3-builder cypress/base-internal:22.15.1-glibc2.31 /bin/bash -c "sleep 1000000000" + docker cp ~/cypress/node_modules/better-sqlite3 better-sqlite3-builder:/better-sqlite3 + docker exec -it better-sqlite3-builder /bin/bash -c "cd /better-sqlite3 && source /root/.bashrc && chown -R root:root . && npm install --ignore-scripts && npx --no-install prebuild -r electron -t 36.4.0 --include-regex 'better_sqlite3.node$'" + docker cp better-sqlite3-builder:/better-sqlite3/build/Release/better_sqlite3.node ~/cypress/node_modules/better-sqlite3/build/Release/better_sqlite3.node + docker rm -f better-sqlite3-builder + cp ~/cypress/node_modules/better-sqlite3/build/Release/better_sqlite3.node ~/cypress/better_sqlite3.node + else + cp ~/cypress/better_sqlite3.node ~/cypress/node_modules/better-sqlite3/build/Release/better_sqlite3.node + fi + - save_cache: + key: better-sqlite3-{{ checksum "node_modules/better-sqlite3/package.json" }}-{{ + checksum "node_modules/electron/package.json" }} + paths: + - better_sqlite3.node + - run: + name: Clean up top level better-sqlite3 file + command: | + rm ~/cypress/better_sqlite3.node + + run-driver-integration-tests: + parameters: + browser: + description: browser shortname to target + type: string + install-chrome-channel: + description: chrome channel to install + type: string + default: 'stable' + firefox-version: + description: firefox version to install + type: string + default: *firefox-stable-version + inject-document-domain: + description: run subset of tests with injectDocumentDomain config enabled + type: boolean + default: false + + steps: + - restore_cached_workspace + - when: + condition: + equal: [ chrome, << parameters.browser >> ] + steps: + - install-browsers: + install-chrome: true + - when: + condition: + equal: [ chrome:beta, << parameters.browser >> ] + steps: + - install-browsers: + install-chrome: true + google-chrome-channel: << parameters.install-chrome-channel >> + google-chrome-version: *chrome-beta-version + - when: + condition: + equal: [ firefox, << parameters.browser >> ] + steps: + - install-browsers: + install-firefox: true + firefox-version: << parameters.firefox-version >> + - when: + condition: + equal: [ webkit, << parameters.browser >> ] + steps: + - install-webkit-deps + - run: + name: Run driver tests in Cypress + environment: + CYPRESS_CONFIG_ENV: production + command: | + echo Current working directory is $PWD + echo Total containers $CIRCLE_NODE_TOTAL + + if << parameters.inject-document-domain >> ; then + YARN_CMD="cypress:run:inject-document-domain" + PARALLEL="--parallel --group 5x-driver-inject-document-domain-<>" + else + YARN_CMD="cypress:run" + PARALLEL="--parallel --group 5x-driver-<>" + fi + + if [[ -v MAIN_RECORD_KEY ]]; then + # internal PR + CYPRESS_RECORD_KEY=$MAIN_RECORD_KEY \ + CYPRESS_INTERNAL_ENABLE_TELEMETRY="true" \ + yarn $YARN_CMD --record $PARALLEL --browser <> --runner-ui + else + # external PR + TESTFILES=$(circleci tests glob "cypress/e2e/**/*.cy.*" | circleci tests split --total=$CIRCLE_NODE_TOTAL) + echo "Test files for this machine are $TESTFILES" + + if [[ -z "$TESTFILES" ]]; then + echo "Empty list of test files" + fi + yarn $YARN_CMD --browser <> --spec $TESTFILES --runner-ui + fi + working_directory: packages/driver + - sanitize-verify-and-store-mocha-results + + windows-install-chrome: + parameters: + browser: + description: browser shortname to target + type: string + steps: + - run: + # TODO: How can we have preinstalled browsers on CircleCI? + name: 'Install Chrome on Windows' + command: | + # install with `--ignore-checksums` to avoid checksum error + # https://www.gep13.co.uk/blog/chocolatey-error-hashes-do-not-match + [[ $PLATFORM == 'windows' && '<>' == 'chrome' ]] && choco install googlechrome -y --ignore-checksums || [[ $PLATFORM != 'windows' ]] + + run-new-ui-tests: + parameters: + package: + description: package to target + type: enum + enum: [ 'frontend-shared', 'launchpad', 'app', 'reporter' ] + browser: + description: browser shortname to target + type: string + executor: + description: the executor in use. Only used if Windows for workaround purposes + type: executor + percy: + description: enable percy + type: boolean + default: false + type: + description: ct or e2e + type: enum + enum: [ 'ct', 'e2e' ] + debug: + description: debug option + type: string + default: '' + steps: + - restore_cached_workspace + # this is a temporary work around while we wait for circle to resolve issues with packages + # with an @ character in windows during save_cache. + # @see https://github.com/cypress-io/cypress/issues/30343 for more details. + - when: + condition: + equal: [ *windows-executor, << parameters.executor >> ] + steps: + - run: + name: reinstall dependencies to work around cache issue (Windows only) + command: rm -rf node_modules && yarn + - install-browsers: + install-chrome: true + install-firefox: true + executor: << parameters.executor >> + - windows-install-chrome: + browser: <> + - run: + name: Run <> UI tests + command: | + echo Current working directory is $PWD + echo Total containers $CIRCLE_NODE_TOTAL + + if [[ -v MAIN_RECORD_KEY ]]; then + # internal PR + cmd=$([[ <> == 'true' ]] && echo 'yarn percy exec --parallel -- --') || true + + 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/<> cypress:run:<> --browser <> --record --parallel --group <>-<> + else + # external PR + + # To make `circleci tests` work correctly, we need to step into the package folder. + cd packages/<> + + if [[ <> == 'ct' ]]; then + # component tests are located side by side with the source codes. + # for the app component tests, ignore specs that are known to cause failures on contributor PRs (see https://discuss.circleci.com/t/how-to-exclude-certain-files-from-circleci-test-globbing/41028) + TESTFILES=$(find src -regextype posix-extended -name '*.cy.*' | circleci tests split --total=$CIRCLE_NODE_TOTAL) + else + GLOB="cypress/e2e/**/*cy.*" + TESTFILES=$(circleci tests glob "$GLOB" | circleci tests split --total=$CIRCLE_NODE_TOTAL) + fi + + echo "Test files for this machine are $TESTFILES" + + # To run the `yarn` command, we need to walk out of the package folder. + cd ../.. + + DEBUG=<> \ + CYPRESS_CONFIG_ENV=production \ + PERCY_PARALLEL_NONCE=$CIRCLE_WORKFLOW_WORKSPACE_ID \ + PERCY_ENABLE=${PERCY_TOKEN:-0} \ + PERCY_PARALLEL_TOTAL=-1 \ + yarn workspace @packages/<> cypress:run:<> --browser <> --spec $TESTFILES + fi + - run: + command: | + if [[ <> == 'app' && <> == 'true' && -d "packages/app/cypress/screenshots/runner/screenshot/screenshot.cy.tsx/percy" ]]; then + PERCY_PARALLEL_NONCE=$CIRCLE_WORKFLOW_WORKSPACE_ID \ + PERCY_ENABLE=${PERCY_TOKEN:-0} \ + PERCY_PARALLEL_TOTAL=-1 \ + yarn percy upload packages/app/cypress/screenshots/runner/screenshot/screenshot.cy.tsx/percy + else + echo "skipping percy screenshots uploading" + fi + - sanitize-verify-and-store-mocha-results + + run-system-tests: + parameters: + browser: + description: browser shortname to target + type: string + steps: + - restore_cached_workspace + - restore_cached_system_tests_deps + - when: + condition: + equal: [ webkit, << parameters.browser >> ] + steps: + - install-webkit-deps + - install-browsers: + install-chrome: true + install-chrome-for-testing: true + install-firefox: true + - run: + name: Run system tests + environment: + CYPRESS_COMMERCIAL_RECOMMENDATIONS: '0' + command: | + ALL_SPECS=`circleci tests glob "/root/cypress/system-tests/test/*spec*"` + SPECS= + for file in $ALL_SPECS; do + # filter out non_root tests, they have their own stage + if [[ "$file" == *"non_root"* ]]; then + echo "Skipping $file" + continue + fi + SPECS="$SPECS $file" + done + SPECS=`echo $SPECS | xargs -n 1 | circleci tests split --split-by=timings` + echo SPECS=$SPECS + yarn workspace @tooling/system-tests test:ci $SPECS --browser <> + - sanitize-verify-and-store-mocha-results + + run-binary-system-tests: + steps: + - restore_cached_workspace + - restore_cached_system_tests_deps + - run: + name: Run system tests + environment: + CYPRESS_COMMERCIAL_RECOMMENDATIONS: '0' + command: | + ALL_SPECS=`circleci tests glob "$HOME/cypress/system-tests/test-binary/*spec*"` + SPECS=`echo $ALL_SPECS | xargs -n 1 | circleci tests split --split-by=timings` + echo SPECS=$SPECS + yarn workspace @tooling/system-tests test:ci $SPECS + - sanitize-verify-and-store-mocha-results + + post-install-comment: + parameters: + package_url_path: + type: string + default: npm-package-url.json + binary_url_path: + type: string + default: binary-url.json + description: Post GitHub comment with a blurb on how to install pre-release version + steps: + - run: + name: Post pre-release install comment + command: | + node scripts/add-install-comment.js \ + --npm << parameters.package_url_path >> \ + --binary << parameters.binary_url_path >> + + sanitize-verify-and-store-mocha-results: + description: Double-check that Mocha tests ran as expected. + parameters: + expectedResultCount: + description: The number of result files to expect, ie, the number of Mocha test + suites that ran. + type: integer + ## pass a default magic number of 0 to assert that at least 1 test ran + default: 0 + testResultsPath: + description: The path to the test results + type: string + default: /tmp/cypress + steps: + - run: + name: 'Sanitize Mocha Results' + when: always + command: | + source ./scripts/ensure-node.sh + yarn sanitize:mocha:results + - run: + name: 'Verify Mocha Results' + command: | + source ./scripts/ensure-node.sh + yarn verify:mocha:results <> + - store_test_results: + path: <> + + clone-repo-and-checkout-branch: + description: | + Clones an external repo and then checks out the branch that matches the next version otherwise uses 'master' branch. + parameters: + repo: + description: "Name of the github repo to clone like: cypress-example-kitchensink" + type: string + pull_request_id: + description: Pull request number to check out before installing and testing + type: integer + default: 0 + steps: + - restore_cached_binary + - run: + name: "Cloning test project and checking out release branch: + <>" + working_directory: /tmp/<> + command: | + git clone --depth 1 --no-single-branch https://github.com/cypress-io/<>.git . + + cd ~/cypress/.. + # install some deps for get-next-version + npm i semver@7.3.2 conventional-recommended-bump@6.1.0 conventional-changelog-angular@5.0.12 minimist@1.2.5 + NEXT_VERSION=$(node ./cypress/scripts/get-next-version.js) + cd - + + git checkout $NEXT_VERSION || true + - when: + condition: <> + steps: + - run: + name: Check out PR <> + working_directory: /tmp/<> + command: | + git fetch origin pull/<>/head:pr-<> + git checkout pr-<> + + test-binary-against-rwa: + description: | + Takes the built binary and NPM package, clones the RWA repo + and runs the new version of Cypress against it. + parameters: + repo: + description: "Name of the github repo to clone like" + type: string + default: "cypress-realworld-app" + browser: + description: Name of the browser to use, like "electron", "chrome", "firefox" + type: enum + enum: [ "", "electron", "chrome", "firefox" ] + default: "" + command: + description: Test command to run to start Cypress tests + type: string + default: "CYPRESS_INTERNAL_ENABLE_TELEMETRY=1 + CYPRESS_RECORD_KEY=$MAIN_RECORD_KEY CYPRESS_PROJECT_ID=ypt4pf yarn + cypress:run" + # if the repo to clone and test is a monorepo, you can + # run tests inside a specific subfolder + folder: + description: Subfolder to test in + type: string + default: "" + # you can test new features in the test runner against recipes or other repos + # by opening a pull request in those repos and running this test job + # against a pull request number in the example repo + pull_request_id: + description: Pull request number to check out before installing and testing + type: integer + default: 0 + server-start-command: + description: Server start command for repo + type: string + default: "CI=true yarn start" + steps: + - clone-repo-and-checkout-branch: + repo: <> + - when: + condition: <> + steps: + - run: + name: Check out PR <> + working_directory: /tmp/<> + command: | + git fetch origin pull/<>/head:pr-<> + git checkout pr-<> + git log -n 2 + - run: + command: yarn + working_directory: /tmp/<> + - run: + name: Install Cypress + working_directory: /tmp/<> + # force installing the freshly built binary + command: | + CYPRESS_INSTALL_BINARY=~/cypress/cypress.zip npm i --legacy-peer-deps ~/cypress/cypress.tgz && [[ -f yarn.lock ]] && yarn + - install-browsers: + install-chrome: true + - run: + name: Print Cypress version + working_directory: /tmp/<> + command: npx cypress version + - run: + name: Types check 🧩 (maybe) + working_directory: /tmp/<> + command: yarn types + - run: + # NOTE: we do not need to wait for the vite dev server to start + working_directory: /tmp/<> + command: <> + background: true + - when: + condition: <> + steps: + - when: + condition: <> + steps: + - run: + name: Run tests using browser "<>" + working_directory: /tmp/<>/<> + command: | + <> --browser <> --record false + - unless: + condition: <> + steps: + - run: + name: Run tests using command + working_directory: /tmp/<>/<> + command: <> + - unless: + condition: <> + steps: + - when: + condition: <> + steps: + - run: + name: Run tests using browser "<>" + working_directory: /tmp/<> + command: <> --browser <> --record false + - unless: + condition: <> + steps: + - run: + name: Run tests using command + working_directory: /tmp/<> + command: <> + + test-binary-against-repo: + description: | + Takes the built binary and NPM package, clones given example repo + and runs the new version of Cypress against it. + parameters: + repo: + description: "Name of the github repo to clone like: cypress-example-kitchensink" + type: string + browser: + description: Name of the browser to use, like "electron", "chrome", "firefox" + type: enum + enum: [ "", "electron", "chrome", "firefox" ] + default: "" + command: + description: Test command to run to start Cypress tests + type: string + default: "npm run e2e" + build-project: + description: Should the project build script be executed + type: boolean + default: true + # if the repo to clone and test is a monorepo, you can + # run tests inside a specific subfolder + folder: + description: Subfolder to test in + type: string + default: "" + # you can test new features in the test runner against recipes or other repos + # by opening a pull request in those repos and running this test job + # against a pull request number in the example repo + pull_request_id: + description: Pull request number to check out before installing and testing + type: integer + default: 0 + wait-on: + description: Whether to use wait-on to wait on a server to be booted + type: string + default: "" + server-start-command: + description: Server start command for repo + type: string + default: "npm start --if-present" + executor: + description: The executor in use. Only used if Windows for workaround purposes + type: executor + default: cy-doc + steps: + - run: + name: Install yarn if not already installed + command: | + yarn --version || npm i -g yarn + - clone-repo-and-checkout-branch: + repo: <> + pull_request_id: <> + - run: + # Ensure we're installing the node-version for the cloned repo + command: | + if [[ -f .node-version ]]; then + branch="<< pipeline.git.branch >>" + + externalBranchPattern='^pull\/[0-9]+' + if [[ $branch =~ $externalBranchPattern ]]; then + # We are unable to curl from the external PR branch location + # so we fall back to develop + branch="develop" + fi + + curl -L https://raw.githubusercontent.com/cypress-io/cypress/$branch/scripts/ensure-node.sh --output ci-ensure-node.sh + else + # if no .node-version file exists, we no-op the node script and use the global yarn + echo '' > ci-ensure-node.sh + fi + working_directory: /tmp/<> + - run: + # Install deps + Cypress binary with yarn if yarn.lock present + command: | + source ./ci-ensure-node.sh + if [[ -f yarn.lock ]]; then + yarn --frozen-lockfile + CYPRESS_INSTALL_BINARY=~/cypress/cypress.zip yarn add -D ~/cypress/cypress.tgz + else + npm install + CYPRESS_INSTALL_BINARY=~/cypress/cypress.zip npm install --legacy-peer-deps ~/cypress/cypress.tgz + fi + working_directory: /tmp/<> + - run: + name: Print Cypress version + working_directory: /tmp/<> + command: | + source ./ci-ensure-node.sh + npx cypress version + - run: + name: Types check 🧩 (maybe) + working_directory: /tmp/<> + command: | + source ./ci-ensure-node.sh + [[ -f yarn.lock ]] && yarn types || npm run types --if-present + - when: + condition: <> + steps: + - run: + name: Build 🏗 (maybe) + working_directory: /tmp/<> + command: | + source ./ci-ensure-node.sh + [[ -f yarn.lock ]] && yarn build || npm run build --if-present + - run: + working_directory: /tmp/<> + command: | + source ./ci-ensure-node.sh + <> + background: true + - when: + condition: + not: + equal: [ "", <> ] + steps: + - run: + name: "Waiting on server to boot: <>" + command: | + npm i -g wait-on + npx wait-on <> --timeout 120000 + - install-browsers: + install-chrome: true + install-firefox: true + executor: << parameters.executor >> + - windows-install-chrome: + browser: <> + - when: + condition: <> + steps: + - when: + condition: <> + steps: + - run: + name: Run tests using browser "<>" + working_directory: /tmp/<>/<> + command: | + <> -- --browser <> + - unless: + condition: <> + steps: + - run: + name: Run tests using command + working_directory: /tmp/<>/<> + command: <> + - unless: + condition: <> + steps: + - when: + condition: <> + steps: + - run: + name: Run tests using browser "<>" + working_directory: /tmp/<> + command: | + source ./ci-ensure-node.sh + <> -- --browser <> + - unless: + condition: <> + steps: + - run: + name: Run tests using command + working_directory: /tmp/<> + command: | + source ./ci-ensure-node.sh + <> + + check-if-binary-exists: + steps: + - run-on-dependencies: + package: internal-scripts + command: build + - run: + name: Check if binary exists, exit if it does + command: | + source ./scripts/ensure-node.sh + yarn gulp e2eTestScaffold + yarn check-binary-on-cdn --version $(node ./scripts/get-next-version.js) --type binary --file cypress.zip + + run-on-dependencies: + parameters: + package: + description: Package to build all dependencies for. All dependencies in the + dependency chain must have a build script. + type: string + command: + description: Command to run on the dependencies. + type: string + steps: + - run: + name: Exec << parameters.command >> recursively on << parameters.package >> + dependencies. + command: | + source ./scripts/ensure-node.sh + yarn lerna run <> --scope=<> --include-dependencies + + build-and-package-binary: + steps: + - run: + name: Check environment variables before code sign (if on Mac/Windows) + # NOTE + # our code sign works via electron-builder + # by default, electron-builder will NOT sign app built in a pull request + # even our internal one (!) + # Usually this is not a problem, since we only build and test binary + # built on the "develop" branch + # but if you need to really build and sign a binary in a PR + # set variable CSC_FOR_PULL_REQUEST=true + command: | + set -e + NEEDS_CODE_SIGNING_WINDOWS=`node -p 'process.platform === "win32"'` + NEEDS_CODE_SIGNING_MAC=`node -p 'process.platform === "darwin"'` + + if [[ "$NEEDS_CODE_SIGNING_MAC" == "true" ]]; then + echo "Checking for required environment variables..." + if [ -z "$CSC_LINK" ]; then + echo "Need to provide environment variable CSC_LINK" + echo "with base64 encoded certificate .p12 file" + exit 1 + fi + if [ -z "$CSC_KEY_PASSWORD" ]; then + echo "Need to provide environment variable CSC_KEY_PASSWORD" + echo "with password for unlocking certificate .p12 file" + exit 1 + fi + echo "Succeeded." + elif [[ "$NEEDS_CODE_SIGNING_WINDOWS" == "true" ]]; then + echo "Checking for required environment variables..." + if [ -z "$WINDOWS_SIGN_USER_NAME" ]; then + echo "Need to provide environment variable WINDOWS_SIGN_USER_NAME" + echo "with password for fetching and signing certificate" + exit 1 + fi + if [ -z "$WINDOWS_SIGN_USER_PASSWORD" ]; then + echo "Need to provide environment variable WINDOWS_SIGN_USER_PASSWORD" + echo "for fetching and signing certificate" + exit 1 + fi + if [ -z "$WINDOWS_SIGN_CREDENTIAL_ID" ]; then + echo "Need to provide environment variable WINDOWS_SIGN_CREDENTIAL_ID" + echo "for identifying certificate" + exit 1 + fi + if [ -z "$WINDOWS_SIGN_USER_TOTP" ]; then + echo "Need to provide environment variable WINDOWS_SIGN_USER_TOTP" + echo "for signing certificate" + exit 1 + fi + echo "Succeeded." + else + echo "Not code signing for this platform" + fi + - 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) + else + yarn binary-build --version $(node ./scripts/get-next-version.js) + fi + - run: + name: Package the Cypress binary + environment: + DEBUG: electron-builder,electron-osx-sign*,electron-notarize* + # notarization on Mac can take a while + 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-package --version $(node ./scripts/get-next-version.js) + else + yarn binary-package --version $(node ./scripts/get-next-version.js) + fi + - run: + name: Smoke Test the Cypress binary + command: | + source ./scripts/ensure-node.sh + node --version + yarn binary-smoke-test --version $(node ./scripts/get-next-version.js) + - run: + name: Zip the binary + command: | + if [[ $PLATFORM == 'linux' ]]; then + # on Arm, CI runs as non-root, on x64 CI runs as root but there is no sudo binary + if [[ `whoami` == 'root' ]]; then + apt-get update && apt-get install -y zip + else + sudo apt-get update && sudo apt-get install -y zip + fi + fi + source ./scripts/ensure-node.sh + yarn binary-zip + - persist_to_workspace: + root: ~/ + paths: + - cypress/cypress.zip + + trigger-publish-binary-pipeline: + steps: + - run: + name: "Trigger publish-binary pipeline" + command: | + source ./scripts/ensure-node.sh + echo $SHOULD_PERSIST_ARTIFACTS + node ./scripts/binary/trigger-publish-binary-pipeline.js + - persist_to_workspace: + root: ~/ + paths: + - triggered_pipeline.json + + build-cypress-npm-package: + parameters: + executor: + type: executor + default: cy-doc + steps: + - run: + name: Bump NPM version + command: | + source ./scripts/ensure-node.sh + yarn get-next-version --npm + - run: + name: Build NPM package + command: | + source ./scripts/ensure-node.sh + yarn lerna run build-cli + - run: + command: ls -la types + working_directory: cli/build + - run: + command: ls -la vue mount-utils react + working_directory: cli/build + - unless: + condition: + equal: [ *windows-executor, << parameters.executor >> ] + steps: + - run: + name: list NPM package contents + command: | + source ./scripts/ensure-node.sh + yarn workspace cypress size + - run: + name: pack NPM package + working_directory: cli/build + command: yarn pack --filename ../../cypress.tgz + - run: + name: list created NPM package + command: ls -l + - persist_to_workspace: + root: ~/ + paths: + - cypress/cypress.tgz + + upload-build-artifacts: + steps: + - run: ls -l + - run: + name: Upload unique binary to S3 + command: | + node scripts/binary.js upload-build-artifact \ + --type binary \ + --file cypress.zip \ + --version $(node -p "require('./package.json').version") + - run: + name: Upload NPM package to S3 + command: | + node scripts/binary.js upload-build-artifact \ + --type npm-package \ + --file cypress.tgz \ + --version $(node -p "require('./package.json').version") + - run: ls -l + - run: cat binary-url.json + - run: cat npm-package-url.json + - persist_to_workspace: + root: ~/ + paths: + - cypress/binary-url.json + - cypress/npm-package-url.json + + update_known_hosts: + description: Ensures that we have the latest Git public keys to prevent git+ssh + from failing. + steps: + - run: + name: Update known_hosts with github.com keys + command: | + mkdir -p ~/.ssh + ssh-keyscan github.com >> ~/.ssh/known_hosts + +jobs: + ## Checks if we already have a valid cache for the node_modules_install and if it has, + ## skips ahead to the build step, otherwise installs and caches the node_modules + node_modules_install: + <<: *defaults + parameters: + <<: *defaultsParameters + resource_class: + type: string + default: medium + build-better-sqlite3: + type: boolean + default: false + resource_class: << parameters.resource_class >> + steps: + - update_known_hosts + - checkout + - install-required-node + - verify-build-setup: + executor: << parameters.executor >> + - persist_to_workspace: + root: ~/ + paths: + - cypress + - .ssh + - .nvm # mac / linux + - ProgramData/nvm # windows + - caching-dependency-installer: + only-cache-for-root-user: <> + build-better-sqlite3: <> + + ## restores node_modules from previous step & builds if first step skipped + build: + <<: *defaults + parameters: + <<: *defaultsParameters + resource_class: + type: string + default: large + is_contributor_pr: + type: boolean + default: false + resource_class: << parameters.resource_class >> + steps: + - restore_cached_workspace + # this is a temporary work around while we wait for circle to resolve issues with packages + # with an @ character in windows during save_cache. + # @see https://github.com/cypress-io/cypress/issues/30343 for more details. + - when: + condition: + equal: [ *windows-executor, << parameters.executor >> ] + steps: + - run: + name: reinstall dependencies to work around cache issue (Windows only) + command: rm -rf node_modules && yarn + - run: + name: Top level packages + command: yarn list --depth=0 || true + - run: + name: Check env canaries + command: node ./scripts/circle-env.js --check-canaries --is-contributor-pr << + parameters.is_contributor_pr >> + - build-and-persist + + lint: + <<: *defaults + steps: + - restore_cached_workspace + - run: + name: Linting 🧹 + command: | + yarn clean + git clean -df + yarn lint + - run: + name: cypress info (dev) + command: node cli/bin/cypress info --dev + + check-ts: + <<: *defaults + steps: + - restore_cached_workspace + - install-required-node + - run: + name: Check TS Types + command: NODE_OPTIONS=--max_old_space_size=4096 yarn check-ts --concurrency=1 + + # a special job that closes the Percy build started by the required jobs + percy-finalize: + <<: *defaults + resource_class: small + parameters: + <<: *defaultsParameters + required_env_var: + type: env_var_name + steps: + - restore_cached_workspace + - run: + # if this is an external pull request, the environment variables + # are NOT set for security reasons, thus no need to to finalize Percy, + # since there will be no visual tests + name: Check if <> is set + command: | + if [[ -v <> ]]; then + echo "Internal PR, good to go" + else + echo "This is an external PR, cannot access other services" + circleci-agent step halt + fi + - run: + # Sometimes, even though all the circle jobs have finished, Percy times out during `build:finalize` + # If all other jobs finish but `build:finalize` fails, we retry it once + name: Finalize percy build - allows single retry + command: | + PERCY_PARALLEL_NONCE=$CIRCLE_WORKFLOW_WORKSPACE_ID \ + yarn percy build:finalize || yarn percy build:finalize + + # verify accessibility scores from Cypress + verify-accessibility-results: + <<: *defaults + resource_class: small + steps: + - run: | + if [[ -z "$MAIN_RECORD_KEY" ]]; then + echo "skipping for contributor PRs since we don't record to the cloud" + circleci-agent step halt + fi + - update_known_hosts + - run: + name: checkout + command: git clone -b "$CIRCLE_BRANCH" "$CIRCLE_REPOSITORY_URL" --depth 1 + - run: + name: Install extract-cloud-results package + command: | + npm install https://cdn.cypress.io/extract-cloud-results/v1/extract-cloud-results.tgz + - run: + name: Verify Accessibility Results + command: | + cp ./cypress/scripts/verify-accessibility-results.js verify-accessibility-results.js + CYPRESS_RECORD_KEY=$MAIN_RECORD_KEY node verify-accessibility-results.js + + ready-to-release: + <<: *defaults + resource_class: small + parameters: + <<: *defaultsParameters + steps: + - run: + name: Ready to release + command: echo 'Ready to release' + + cli-visual-tests: + <<: *defaults + resource_class: small + steps: + - restore_cached_workspace + - run: mkdir -p cli/visual-snapshots + - run: + command: node cli/bin/cypress info --dev | yarn --silent term-to-html | node + scripts/sanitize --type cli-info > + cli/visual-snapshots/cypress-info.html + environment: + FORCE_COLOR: 2 + - run: + command: node cli/bin/cypress help | yarn --silent term-to-html > + cli/visual-snapshots/cypress-help.html + environment: + FORCE_COLOR: 2 + - run: + name: Upload CLI snapshots for diffing + command: | + PERCY_PARALLEL_NONCE=$CIRCLE_WORKFLOW_WORKSPACE_ID \ + PERCY_ENABLE=${PERCY_TOKEN:-0} \ + PERCY_PARALLEL_TOTAL=-1 \ + yarn percy snapshot ./cli/visual-snapshots + + v8-integration-tests: + <<: *defaults + parameters: + <<: *defaultsParameters + resource_class: + type: string + default: medium + resource_class: << parameters.resource_class >> + parallelism: 1 + steps: + - restore_cached_workspace + - restore_cached_system_tests_deps + # this is a temporary work around while we wait for circle to resolve issues with packages + # with an @ character in windows during save_cache. + # @see https://github.com/cypress-io/cypress/issues/30343 for more details. + - when: + condition: + equal: [ *windows-executor, << parameters.executor >> ] + steps: + - run: + name: reinstall dependencies to work around cache issue (Windows only) + command: rm -rf node_modules && yarn + # TODO: Remove this once we switch off self-hosted M1 runners + - when: + condition: + equal: [ *darwin-arm64-executor, << parameters.executor >> ] + steps: + - run: rm -f /tmp/cypress/junit/* + - unless: + condition: + or: + - equal: [ *linux-arm64-executor, << parameters.executor >> ] # TODO: Figure out how to support linux-arm64 when we get to linux arm64 build: https://github.com/cypress-io/cypress/issues/23557 + steps: + - run: + name: Run v8 integration tests + command: | + source ./scripts/ensure-node.sh + yarn test-integration --scope=@tooling/{packherd,v8-snapshot,electron-mksnapshot} + - sanitize-verify-and-store-mocha-results: + expectedResultCount: 3 + - when: + condition: + or: + - equal: [ *linux-arm64-executor, << parameters.executor >> ] + steps: + - run: + name: Run v8 integration tests + command: | + source ./scripts/ensure-node.sh + yarn test-integration --scope=@tooling/packherd + - sanitize-verify-and-store-mocha-results: + expectedResultCount: 1 + + driver-integration-memory-tests: + <<: *defaults + parameters: + <<: *defaultsParameters + resource_class: + type: string + default: medium + resource_class: << parameters.resource_class >> + parallelism: 1 + steps: + - restore_cached_workspace + # this is a temporary work around while we wait for circle to resolve issues with packages + # with an @ character in windows during save_cache. + # @see https://github.com/cypress-io/cypress/issues/30343 for more details. + - when: + condition: + equal: [ *windows-executor, << parameters.executor >> ] + steps: + - run: + name: reinstall dependencies to work around cache issue (Windows only) + command: rm -rf node_modules && yarn + - run: + name: Driver memory tests in Electron + environment: + CYPRESS_CONFIG_ENV: production + command: | + echo Current working directory is $PWD + 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 libgbm-dev + fi + + CYPRESS_INTERNAL_MEMORY_SAVE_STATS=true \ + DEBUG=cypress*memory \ + yarn cypress:run --browser electron --spec "cypress/e2e/memory/*.cy.*" + working_directory: packages/driver + - sanitize-verify-and-store-mocha-results + + unit-tests: + <<: *defaults + parameters: + <<: *defaultsParameters + resource_class: + type: string + default: medium + resource_class: << parameters.resource_class >> + parallelism: 1 + steps: + - restore_cached_workspace + - install-browsers: + install-chrome: true + executor: << parameters.executor >> + - when: + condition: + # several snapshots fails for windows due to paths. + # until these are fixed, run the tests that are working. + equal: [ *windows-executor, << parameters.executor >> ] + steps: + - run: yarn test-scripts scripts/**/*spec.js + - sanitize-verify-and-store-mocha-results + - unless: + condition: + equal: [ *windows-executor, << parameters.executor >> ] + steps: + - run: yarn test-scripts + # run unit tests from each individual package + - run: yarn test + # run type checking for each individual package + - run: yarn lerna run types + - sanitize-verify-and-store-mocha-results: + expectedResultCount: 20 + + verify-release-readiness: + <<: *defaults + resource_class: small + parallelism: 1 + environment: + GITHUB_TOKEN: $GH_TOKEN + steps: + - restore_cached_workspace + - update_known_hosts + - run: yarn test-npm-package-release-script + - run: node ./scripts/semantic-commits/validate-binary-changelog.js + - store_artifacts: + path: /tmp/releaseData + + lint-types: + <<: *defaults + parallelism: 1 + steps: + - restore_cached_workspace + - run: + command: ls -la types + working_directory: cli + - run: + command: ls -la chai + working_directory: cli/types + - run: + name: "Lint types 🧹" + command: yarn workspace cypress dtslint + + server-unit-tests: + <<: *defaults + parallelism: 1 + steps: + - restore_cached_workspace + - run: yarn test-unit --scope=@packages/server + - sanitize-verify-and-store-mocha-results: + expectedResultCount: 1 + + server-unit-tests-cloud-environment: + <<: *defaults + parameters: + <<: *defaultsParameters + resource_class: + type: string + default: medium + resource_class: << parameters.resource_class >> + parallelism: 1 + steps: + - restore_cached_workspace + # TODO: Remove this once we switch off self-hosted M1 runners + - when: + condition: + equal: [ *darwin-arm64-executor, << parameters.executor >> ] + steps: + - run: rm -f /tmp/cypress/junit/* + # this is a temporary work around while we wait for circle to resolve issues with packages + # with an @ character in windows during save_cache. + # @see https://github.com/cypress-io/cypress/issues/30343 for more details. + - when: + condition: + equal: [ *windows-executor, << parameters.executor >> ] + steps: + - run: + name: reinstall dependencies to work around cache issue (Windows only) + command: rm -rf node_modules && yarn + - run: yarn workspace @packages/server test-unit cloud/environment_spec.ts + - sanitize-verify-and-store-mocha-results: + expectedResultCount: 1 + + server-integration-tests: + <<: *defaults + parallelism: 1 + steps: + - restore_cached_workspace + - install-browsers: + install-chrome: true + - run: yarn test-integration --scope=@packages/server + - sanitize-verify-and-store-mocha-results: + expectedResultCount: 1 + + server-performance-tests: + <<: *defaults + steps: + - restore_cached_workspace + - install-browsers: + install-chrome: true + install-firefox: true + - run: + command: yarn workspace @packages/server test-performance + - sanitize-verify-and-store-mocha-results: + expectedResultCount: 1 + + system-tests-node-modules-install: + <<: *defaults + steps: + - restore_cached_workspace + - update_cached_system_tests_deps + + binary-system-tests: + parallelism: 2 + working_directory: ~/cypress + environment: + <<: *defaultsEnvironment + PLATFORM: linux + machine: + # using `machine` gives us a Linux VM that can run Docker + image: ubuntu-2004:2024.05.1 + docker_layer_caching: true + resource_class: medium + steps: + - maybe_skip_binary_jobs + - run-binary-system-tests + yarn-pnp-preprocessor-system-test: + parallelism: 1 + working_directory: ~/cypress + docker: + # we need an image with yarn 4 berry installed on it to run this test + - image: cypress/base-internal:22.15.1-yarn-berry + environment: + # needed to inform the bootstrap-docker-container.sh script to link the binary in the system-test project directory + REPO_DIR: /root/cypress + TEST_PROJECT_DIR: ./system-tests/projects/yarn-v4.3.1-pnp-dep-resolution + USE_YARN_TO_INSTALL_CYPRESS_BINARY: true + steps: + - maybe_skip_binary_jobs + - attach_workspace: + at: ~/ + # required node is set in the docker container already with yarn 4 + - run: + name: Install monorepo dependencies with yarn v1.22.22 + command: | + # we need to install the monorepo dependencies here in a fresh manner. + # set to the expected version of yarn and install the dependencies + yarn set version 1.22.22 + yarn install --ignore-scripts + - run: + name: install dependencies in yarn-v4.3.1-pnp-dep-resolution with yarn berry + 4.3.1 + command: | + yarn set version 4.3.1 + cd ./system-tests/projects/yarn-v4.3.1-pnp-dep-resolution && yarn + - run: + name: Bootstrap the Cypress binary and run binary system test + command: | + # we need to bootstrap the binary into our project directory and run the tests + source ./system-tests/scripts/bootstrap-docker-container.sh 'yarn cypress run' + # We can remove this job a once https://github.com/sveltejs/svelte-loader/issues/243 is resolved. + svelte-webpack-system-test: + parallelism: 1 + working_directory: ~/cypress + docker: + - image: cypress/base-internal:22.15.1-bullseye + environment: + # needed to inform the bootstrap-docker-container.sh script to link the binary in the system-test project directory + REPO_DIR: /root/cypress + TEST_PROJECT_DIR: ./system-tests/projects/svelte-webpack-configured + USE_YARN_TO_INSTALL_CYPRESS_BINARY: true + steps: + - maybe_skip_binary_jobs + - attach_workspace: + at: ~/ + - run: + name: Install monorepo dependencies + command: yarn install --ignore-scripts + - run: + name: install dependencies + command: cd ./system-tests/projects/svelte-webpack-configured && yarn + - run: + name: Bootstrap the Cypress binary and run binary system test + command: | + # we need to bootstrap the binary into our project directory and run the tests + source ./system-tests/scripts/bootstrap-docker-container.sh 'yarn cypress run --component --spec src/mount.cy.ts src/App.cy.ts' + + 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: + browser: webkit + + system-tests-non-root: + <<: *defaults + steps: + - restore_cached_workspace + - run: + environment: + CYPRESS_COMMERCIAL_RECOMMENDATIONS: '0' + command: yarn workspace @tooling/system-tests test:ci "test/non_root*spec*" + --browser electron + - sanitize-verify-and-store-mocha-results + + run-frontend-shared-component-tests-chrome: + <<: *defaults + parameters: + <<: *defaultsParameters + percy: + type: boolean + default: false + parallelism: 3 + steps: + - run-new-ui-tests: + browser: chrome + executor: << parameters.executor >> + percy: << parameters.percy >> + package: frontend-shared + type: ct + + run-launchpad-component-tests-chrome: + <<: *defaults + parameters: + <<: *defaultsParameters + percy: + type: boolean + default: false + parallelism: 7 + steps: + - run-new-ui-tests: + browser: chrome + executor: << parameters.executor >> + percy: << parameters.percy >> + package: launchpad + type: ct + # debug: cypress:*,engine:socket + + run-launchpad-integration-tests-chrome: + <<: *defaults + parameters: + <<: *defaultsParameters + resource_class: + type: string + default: large + percy: + type: boolean + default: false + resource_class: << parameters.resource_class >> + parallelism: 3 + steps: + - run-new-ui-tests: + browser: chrome + executor: << parameters.executor >> + percy: << parameters.percy >> + package: launchpad + type: e2e + + run-app-component-tests-chrome: + <<: *defaults + parameters: + <<: *defaultsParameters + resource_class: + type: string + default: medium+ + percy: + type: boolean + default: false + parallelism: 7 + steps: + - run-new-ui-tests: + browser: chrome + executor: << parameters.executor >> + percy: << parameters.percy >> + package: app + type: ct + + run-app-integration-tests-chrome: + <<: *defaults + parameters: + <<: *defaultsParameters + resource_class: + type: string + default: large + percy: + type: boolean + default: false + resource_class: << parameters.resource_class >> + parallelism: 8 + steps: + - run-new-ui-tests: + browser: chrome + executor: << parameters.executor >> + percy: << parameters.percy >> + package: app + type: e2e + + 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-inject-document-domain: + <<: *defaults + parallelism: 5 + resource_class: medium+ + steps: + - run-driver-integration-tests: + browser: chrome + install-chrome-channel: stable + inject-document-domain: true + + driver-integration-tests-chrome-beta: + <<: *defaults + resource_class: medium+ + parallelism: 5 + steps: + - run-driver-integration-tests: + browser: chrome:beta + install-chrome-channel: beta + + driver-integration-tests-chrome-beta-inject-document-domain: + <<: *defaults + resource_class: medium+ + parallelism: 5 + steps: + - run-driver-integration-tests: + browser: chrome:beta + install-chrome-channel: beta + inject-document-domain: true + + driver-integration-tests-firefox: + <<: *defaults + resource_class: medium+ + parallelism: 5 + steps: + - run-driver-integration-tests: + browser: firefox + + driver-integration-tests-electron: + <<: *defaults + parallelism: 5 + steps: + - run-driver-integration-tests: + browser: electron + + driver-integration-tests-webkit: + <<: *defaults + resource_class: large + parallelism: 5 + steps: + - run-driver-integration-tests: + browser: webkit + # inject document domain must be true for webkit, as cy.origin is not supported + inject-document-domain: true + + run-reporter-component-tests-chrome: + <<: *defaults + parameters: + <<: *defaultsParameters + percy: + type: boolean + default: false + parallelism: 2 + steps: + - run-new-ui-tests: + browser: chrome + executor: << parameters.executor >> + percy: << parameters.percy >> + package: reporter + type: ct + + reporter-integration-tests: + <<: *defaults + resource_class: medium+ + parallelism: 3 + steps: + - restore_cached_workspace + - run: + command: yarn build-for-tests + working_directory: packages/reporter + - run: + command: | + 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 \ + yarn percy exec --parallel -- -- \ + yarn cypress:run --record --parallel --group reporter --runner-ui + working_directory: packages/reporter + - sanitize-verify-and-store-mocha-results + + run-webpack-dev-server-integration-tests: + <<: *defaults + resource_class: medium+ + parallelism: 2 + steps: + - restore_cached_workspace + - restore_cached_system_tests_deps + - install-browsers: + install-chrome: true + - run: + command: | + 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 \ + yarn percy exec --parallel -- -- \ + yarn cypress:run --record --parallel --group webpack-dev-server + working_directory: npm/webpack-dev-server + - sanitize-verify-and-store-mocha-results + + run-vite-dev-server-integration-tests: + <<: *defaults + # parallelism: 3 TODO: Add parallelism once we have more specs + steps: + - restore_cached_workspace + - restore_cached_system_tests_deps + - install-browsers: + install-chrome: true + - run: + command: | + 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 \ + yarn percy exec --parallel -- -- \ + yarn cypress:run --record --parallel --group vite-dev-server + working_directory: npm/vite-dev-server + - sanitize-verify-and-store-mocha-results + + npm-webpack-preprocessor: + <<: *defaults + steps: + - restore_cached_workspace + - run: + name: Build + command: yarn lerna run build --scope=@cypress/webpack-preprocessor + - run: + name: Run tests + command: yarn workspace @cypress/webpack-preprocessor test + + npm-webpack-dev-server: + <<: *defaults + steps: + - restore_cached_workspace + - restore_cached_system_tests_deps + - run: + name: Run tests + command: yarn workspace @cypress/webpack-dev-server test + - run: + name: Run tests + command: yarn workspace @cypress/webpack-dev-server test + + npm-vite-dev-server: + <<: *defaults + steps: + - restore_cached_workspace + - run: + name: Run tests + command: yarn test + working_directory: npm/vite-dev-server + - sanitize-verify-and-store-mocha-results: + testResultsPath: npm/vite-dev-server/test_results + + npm-webpack-batteries-included-preprocessor: + <<: *defaults + resource_class: small + steps: + - restore_cached_workspace + - run: + name: Run tests + command: yarn workspace @cypress/webpack-batteries-included-preprocessor test + + npm-vue: + <<: *defaults + steps: + - restore_cached_workspace + - run: + name: Build + command: yarn lerna run build --scope=@cypress/vue + - run: + name: Run tests + command: yarn test + working_directory: npm/vue + - sanitize-verify-and-store-mocha-results: + testResultsPath: npm/vue/test_results + + npm-angular: + <<: *defaults + steps: + - restore_cached_workspace + - run: + name: Build + command: yarn lerna run build --scope=@cypress/angular + + npm-puppeteer-unit-tests: + <<: *defaults + steps: + - restore_cached_workspace + - run: + name: Build + command: yarn lerna run build --scope=@cypress/puppeteer + - run: + name: Run tests + command: yarn test + working_directory: npm/puppeteer + - sanitize-verify-and-store-mocha-results: + testResultsPath: npm/puppeteer/test_results + + npm-puppeteer-cypress-tests: + <<: *defaults + resource_class: small + steps: + - restore_cached_workspace + - restore_cached_system_tests_deps + - install-browsers: + install-chrome: true + - run: + command: yarn cypress:run + working_directory: npm/puppeteer + - sanitize-verify-and-store-mocha-results + + npm-react: + <<: *defaults + steps: + - restore_cached_workspace + - run: + name: Build + command: yarn lerna run build --scope=@cypress/react + - run: + name: Run tests + command: yarn test + working_directory: npm/react + - sanitize-verify-and-store-mocha-results: + testResultsPath: npm/react/test_results + + npm-vite-plugin-cypress-esm: + <<: *defaults + steps: + - restore_cached_workspace + - run: + name: Build + command: yarn lerna run build --scope=@cypress/vite-plugin-cypress-esm + - run: + name: Run tests + command: yarn test + working_directory: npm/vite-plugin-cypress-esm + - sanitize-verify-and-store-mocha-results: + testResultsPath: npm/vite-plugin-cypress-esm/test_results + + npm-mount-utils: + <<: *defaults + steps: + - restore_cached_workspace + - run: + name: Build + command: yarn lerna run build --scope=@cypress/mount-utils + + npm-grep: + <<: *defaults + resource_class: small + steps: + - restore_cached_workspace + - run: + name: Run tests + command: yarn workspace @cypress/grep cy:run + - sanitize-verify-and-store-mocha-results: + testResultsPath: npm/grep/test_results + + npm-eslint-plugin-dev: + <<: *defaults + steps: + - restore_cached_workspace + - run: + name: Run tests + command: yarn workspace @cypress/eslint-plugin-dev test + + npm-cypress-schematic: + <<: *defaults + steps: + - restore_cached_workspace + - run: + name: Build + Install + command: | + yarn lerna run build --scope=@cypress/schematic + - run: + name: Run unit tests + command: | + yarn test + working_directory: npm/cypress-schematic + + npm-release: + <<: *defaults + resource_class: medium+ + steps: + - restore_cached_workspace + - run: + name: Release packages after all jobs pass + command: yarn npm-release + + create-build-artifacts: + <<: *defaults + parameters: + <<: *defaultsParameters + resource_class: + type: string + default: xlarge + resource_class: << parameters.resource_class >> + steps: + - restore_cached_workspace + # this is a temporary work around while we wait for circle to resolve issues with packages + # with an @ character in windows during save_cache. + # @see https://github.com/cypress-io/cypress/issues/30343 for more details. + - when: + condition: + equal: [ *windows-executor, << parameters.executor >> ] + steps: + - run: + name: reinstall dependencies to work around cache issue (Windows only) + command: rm -rf node_modules && yarn + - check-if-binary-exists + - build-and-package-binary + - build-cypress-npm-package: + executor: << parameters.executor >> + - setup_should_persist_artifacts + - verify_should_persist_artifacts + - upload-build-artifacts + - post-install-comment + + create-and-trigger-packaging-artifacts: + <<: *defaults + parameters: + <<: *defaultsParameters + resource_class: + type: string + default: small + resource_class: << parameters.resource_class >> + steps: + - maybe_skip_binary_jobs + - restore_cached_workspace + - check-if-binary-exists + - setup_should_persist_artifacts + - trigger-publish-binary-pipeline + + get-published-artifacts: + <<: *defaults + parameters: + <<: *defaultsParameters + resource_class: + type: string + default: medium + resource_class: << parameters.resource_class >> + steps: + - maybe_skip_binary_jobs + - restore_cached_workspace + - run: + name: Check pipeline info + command: cat ~/triggered_pipeline.json + - setup_should_persist_artifacts + - run: + name: Download binary artifacts + command: | + source ./scripts/ensure-node.sh + node ./scripts/binary/get-published-artifacts.js --pipelineInfo ~/triggered_pipeline.json --platformKey $(node ./scripts/get-platform-key.js) + - persist_to_workspace: + root: ~/ + paths: + - cypress/cypress.zip + - cypress/cypress.tgz + - verify_should_persist_artifacts + - persist_to_workspace: + root: ~/ + paths: + - cypress/binary-url.json + - cypress/npm-package-url.json + - post-install-comment: + package_url_path: ~/cypress/npm-package-url.json + binary_url_path: ~/cypress/binary-url.json + + test-kitchensink: + <<: *defaults + parameters: + <<: *defaultsParameters + resource_class: + type: string + default: medium+ + resource_class: << parameters.resource_class >> + steps: + - restore_cached_workspace + - clone-repo-and-checkout-branch: + repo: cypress-example-kitchensink + - install-required-node + - run: + name: Install prod dependencies + command: yarn --production --ignore-engines + working_directory: /tmp/cypress-example-kitchensink + - run: + name: Example server + command: yarn start + working_directory: /tmp/cypress-example-kitchensink + background: true + - run: + name: Run Kitchensink example project + command: | + yarn cypress:run --project /tmp/cypress-example-kitchensink + + test-kitchensink-against-staging: + <<: *defaults + steps: + - restore_cached_workspace + - clone-repo-and-checkout-branch: + repo: cypress-example-kitchensink + - install-required-node + - run: + name: Install prod dependencies + command: yarn --production + working_directory: /tmp/cypress-example-kitchensink + - run: + name: Example server + command: yarn start + working_directory: /tmp/cypress-example-kitchensink + background: true + - run: + name: Run Kitchensink example project + command: | + source ./scripts/ensure-node.sh + CYPRESS_PROJECT_ID=$TEST_KITCHENSINK_PROJECT_ID \ + CYPRESS_RECORD_KEY=$TEST_KITCHENSINK_RECORD_KEY \ + CYPRESS_INTERNAL_ENV=staging \ + yarn cypress:run --project /tmp/cypress-example-kitchensink --record + + test-against-staging: + <<: *defaults + steps: + - restore_cached_workspace + - clone-repo-and-checkout-branch: + repo: cypress-test-tiny + - run: + name: Run test project + command: | + CYPRESS_PROJECT_ID=$TEST_TINY_PROJECT_ID \ + CYPRESS_RECORD_KEY=$TEST_TINY_RECORD_KEY \ + CYPRESS_INTERNAL_ENV=staging \ + yarn cypress:run --project /tmp/cypress-test-tiny --record + + test-npm-module-and-verify-binary: + <<: *defaults + resource_class: small + steps: + - restore_cached_workspace + # make sure we have cypress.zip received + - run: ls -l + - run: ls -l cypress.zip cypress.tgz + - run: mkdir test-binary + - run: + name: Create new NPM package + working_directory: test-binary + command: npm init -y + - run: + # install NPM from built NPM package folder + name: Install Cypress + working_directory: test-binary + # force installing the freshly built binary + command: CYPRESS_INSTALL_BINARY=/root/cypress/cypress.zip npm i + /root/cypress/cypress.tgz + - run: + name: Cypress version + working_directory: test-binary + command: $(yarn bin cypress) version + - run: + name: Verify Cypress binary + working_directory: test-binary + command: $(yarn bin cypress) verify + - run: + name: Cypress help + working_directory: test-binary + command: $(yarn bin cypress) help + - run: + name: Cypress info + working_directory: test-binary + command: $(yarn bin cypress) info + + test-npm-module-on-minimum-node-version: + <<: *defaults + resource_class: small + docker: + - image: cypress/base-internal:22.15.1 + steps: + - maybe_skip_binary_jobs + - restore_workspace_binaries + - run: mkdir test-binary + - run: + name: Create new NPM package + working_directory: test-binary + command: npm init -y + - run: + name: Install Cypress + working_directory: test-binary + command: CYPRESS_INSTALL_BINARY=/root/cypress/cypress.zip npm install + /root/cypress/cypress.tgz + - run: + name: Verify Cypress binary + working_directory: test-binary + command: npx cypress verify + - run: + name: Print Cypress version + working_directory: test-binary + command: npx cypress version + - run: + name: Cypress info + working_directory: test-binary + command: npx cypress info + + test-types-cypress-and-jest: + parameters: + executor: + description: Executor name to use + type: executor + default: cy-doc + wd: + description: Working directory, should be OUTSIDE cypress monorepo folder + type: string + default: /root/test-cypress-and-jest + <<: *defaults + resource_class: small + steps: + - maybe_skip_binary_jobs + - restore_workspace_binaries + - run: mkdir <> + - run: + name: Create new NPM package ⚗️ + working_directory: <> + command: npm init -y + - run: + name: Install dependencies 📦 + working_directory: <> + environment: + CYPRESS_INSTALL_BINARY: /root/cypress/cypress.zip + # let's install Cypress, Jest and any other package that might conflict + # https://github.com/cypress-io/cypress/issues/6690 + + # Todo: Add `jest` back into the list once https://github.com/yargs/yargs-parser/issues/452 + # is resolved. + command: | + npm install /root/cypress/cypress.tgz \ + typescript @types/jest enzyme @types/enzyme + - run: + name: Test types clash ⚔️ + working_directory: <> + command: | + echo "console.log('hello world')" > hello.ts + npx tsc hello.ts --noEmit + + test-full-typescript-project: + parameters: + executor: + description: Executor name to use + type: executor + default: cy-doc + <<: *defaults + resource_class: small + steps: + - maybe_skip_binary_jobs + - restore_workspace_binaries + - clone-repo-and-checkout-branch: + repo: cypress-test-tiny + - run: + name: Checkout Typescript Example + working_directory: /tmp/cypress-test-tiny + command: | + git checkout full-typescript + - run: + name: Install dependencies 📦 + working_directory: /tmp/cypress-test-tiny + environment: + CYPRESS_INSTALL_BINARY: /root/cypress/cypress.zip + command: | + npm install /root/cypress/cypress.tgz typescript + - run: + name: Run project tests 🗳 + working_directory: /tmp/cypress-test-tiny + command: npm run cypress:run + + # install NPM + binary zip and run against staging API + test-binary-against-staging: + <<: *defaults + steps: + - restore_workspace_binaries + - clone-repo-and-checkout-branch: + repo: cypress-test-tiny + - run: + name: Install Cypress + working_directory: /tmp/cypress-test-tiny + # force installing the freshly built binary + command: CYPRESS_INSTALL_BINARY=~/cypress/cypress.zip npm i --legacy-peer-deps + ~/cypress/cypress.tgz + - run: + name: Run test project + working_directory: /tmp/cypress-test-tiny + command: | + CYPRESS_PROJECT_ID=$TEST_TINY_PROJECT_ID \ + CYPRESS_RECORD_KEY=$TEST_TINY_RECORD_KEY \ + CYPRESS_INTERNAL_ENV=staging \ + $(yarn bin cypress) run --record + + test-binary-against-recipes-firefox: + <<: *defaults + steps: + - test-binary-against-repo: + repo: cypress-example-recipes + command: npm run test:ci:firefox + browser: firefox + + test-binary-against-recipes-chrome: + <<: *defaults + steps: + - test-binary-against-repo: + repo: cypress-example-recipes + command: npm run test:ci:chrome + browser: chrome + + test-binary-against-recipes: + <<: *defaults + parallelism: 4 + steps: + - test-binary-against-repo: + repo: cypress-example-recipes + # 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 + # built test runner against a pull request in the repo + # cypress-example-recipes. + # Imagine you are working on a feature and want to show / test a recipe + # You would need to run the built test runner before release + # against a PR that cannot be merged until the new version + # of the test runner is released. + # Use: + # specify pull request number + # and the recipe folder + + # test-binary-against-recipe-pull-request: + # <<: *defaults + # steps: + # # test a specific pull request by number from cypress-example-recipes + # - test-binary-against-repo: + # repo: cypress-example-recipes + # command: npm run test:ci + # pull_request_id: 515 + # folder: examples/fundamentals__typescript + + test-binary-against-kitchensink: + <<: *defaults + steps: + - maybe_skip_binary_jobs + - test-binary-against-repo: + repo: cypress-example-kitchensink + browser: electron + + test-binary-against-kitchensink-firefox: + <<: *defaults + steps: + - test-binary-against-repo: + repo: cypress-example-kitchensink + browser: firefox + + test-binary-against-kitchensink-chrome: + <<: *defaults + steps: + - test-binary-against-repo: + repo: cypress-example-kitchensink + browser: chrome + executor: << parameters.executor >> + + test-binary-against-todomvc-firefox: + <<: *defaults + steps: + - test-binary-against-repo: + repo: cypress-example-todomvc + browser: firefox + + test-binary-against-cypress-realworld-app: + <<: *defaults + resource_class: medium+ + steps: + - test-binary-against-rwa: + repo: cypress-realworld-app + browser: chrome + + test-binary-as-specific-user: + <<: *defaults + steps: + - maybe_skip_binary_jobs + - restore_workspace_binaries + - clone-repo-and-checkout-branch: + repo: cypress-test-tiny + # the user should be "node" + - run: whoami + - run: pwd + # prints the current user's effective user id + # for root it is 0 + # for other users it is a positive integer + - run: node -e 'console.log(process.geteuid())' + # make sure the binary and NPM package files are present + - run: ls -l + - run: ls -l cypress.zip cypress.tgz + - run: + # install NPM from built NPM package folder + name: Install Cypress + working_directory: /tmp/cypress-test-tiny + # force installing the freshly built binary + command: CYPRESS_INSTALL_BINARY=~/cypress/cypress.zip npm i + ~/cypress/cypress.tgz + - run: + name: Cypress help + working_directory: /tmp/cypress-test-tiny + command: $(yarn bin cypress) help + - run: + name: Cypress info + working_directory: /tmp/cypress-test-tiny + command: $(yarn bin cypress) info + - run: + name: Verify Cypress binary + working_directory: /tmp/cypress-test-tiny + command: DEBUG=cypress:cli $(yarn bin cypress) verify + - run: + name: Run Cypress binary + working_directory: /tmp/cypress-test-tiny + command: DEBUG=cypress:cli $(yarn bin cypress) run diff --git a/.circleci/workflows-src/workflows/@main.yml b/.circleci/workflows-src/workflows/@main.yml new file mode 100644 index 00000000000..164ebcba3d1 --- /dev/null +++ b/.circleci/workflows-src/workflows/@main.yml @@ -0,0 +1,1053 @@ + + +linux-x64: + when: &full-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 >> ] + - matches: + pattern: /^release\/\d+\.\d+\.\d+$/ + value: << pipeline.git.branch >> + jobs: + - node_modules_install: + build-better-sqlite3: true + - build: + context: test-runner:env-canary + requires: + - node_modules_install + - check-ts: + requires: + - build + - lint: + name: linux-lint + requires: + - build + - percy-finalize: + context: test-runner:percy + required_env_var: PERCY_TOKEN + requires: + - cli-visual-tests + - reporter-integration-tests + - run-app-component-tests-chrome + - run-app-integration-tests-chrome + - run-frontend-shared-component-tests-chrome + - run-launchpad-component-tests-chrome + - run-launchpad-integration-tests-chrome + - run-reporter-component-tests-chrome + - run-webpack-dev-server-integration-tests + - run-vite-dev-server-integration-tests + # Cypress run must be completed to fetch Accessibility report + - verify-accessibility-results: + context: test-runner:cypress-record-key + requires: + - reporter-integration-tests + - run-app-component-tests-chrome + - run-app-integration-tests-chrome + - run-frontend-shared-component-tests-chrome + - run-launchpad-component-tests-chrome + - run-launchpad-integration-tests-chrome + - run-reporter-component-tests-chrome + - run-webpack-dev-server-integration-tests + - run-vite-dev-server-integration-tests + - driver-integration-tests-firefox + - driver-integration-tests-chrome + - driver-integration-tests-chrome-inject-document-domain + - driver-integration-tests-chrome-beta-inject-document-domain + - driver-integration-tests-electron + - driver-integration-tests-webkit + - driver-integration-memory-tests + - lint-types: + requires: + - build + # unit, integration and e2e tests + - cli-visual-tests: + context: test-runner:percy + requires: + - build + - unit-tests: + requires: + - build + - verify-release-readiness: + context: test-runner:npm-release + requires: + - build + - server-unit-tests: + requires: + - build + - server-integration-tests: + requires: + - build + - server-performance-tests: + requires: + - build + - system-tests-node-modules-install: + context: test-runner:performance-tracking + requires: + - build + - system-tests-chrome: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-electron: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-firefox: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-webkit: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-non-root: + context: test-runner:performance-tracking + executor: non-root-docker-user + requires: + - system-tests-node-modules-install + - driver-integration-tests-chrome: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-chrome-inject-document-domain: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-chrome-beta: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-chrome-beta-inject-document-domain: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-firefox: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-electron: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-webkit: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-memory-tests: + requires: + - build + - run-frontend-shared-component-tests-chrome: + context: + [ + test-runner:cypress-record-key, + test-runner:launchpad-tests, + test-runner:percy + ] + percy: true + requires: + - build + - run-launchpad-integration-tests-chrome: + context: + [ + test-runner:cypress-record-key, + test-runner:launchpad-tests, + test-runner:percy + ] + percy: true + requires: + - build + - run-launchpad-component-tests-chrome: + context: + [ + test-runner:cypress-record-key, + test-runner:launchpad-tests, + test-runner:percy + ] + percy: true + requires: + - build + - run-app-integration-tests-chrome: + context: + [ + test-runner:cypress-record-key, + test-runner:launchpad-tests, + test-runner:percy + ] + percy: true + requires: + - build + - run-webpack-dev-server-integration-tests: + context: [ test-runner:cypress-record-key, test-runner:percy ] + requires: + - system-tests-node-modules-install + - run-vite-dev-server-integration-tests: + context: [ test-runner:cypress-record-key, test-runner:percy ] + requires: + - system-tests-node-modules-install + - run-app-component-tests-chrome: + context: + [ + test-runner:cypress-record-key, + test-runner:launchpad-tests, + test-runner:percy + ] + percy: true + requires: + - build + - run-reporter-component-tests-chrome: + context: [ test-runner:cypress-record-key, test-runner:percy ] + percy: true + requires: + - build + - reporter-integration-tests: + context: [ test-runner:cypress-record-key, test-runner:percy ] + requires: + - build + - npm-webpack-dev-server: + requires: + - system-tests-node-modules-install + - npm-vite-dev-server: + requires: + - build + - npm-vite-plugin-cypress-esm: + requires: + - build + - npm-webpack-preprocessor: + requires: + - build + - npm-webpack-batteries-included-preprocessor: + requires: + - build + - npm-vue: + requires: + - build + - npm-puppeteer-unit-tests: + requires: + - build + - npm-puppeteer-cypress-tests: + requires: + - build + - npm-react: + requires: + - build + - npm-angular: + requires: + - build + - npm-mount-utils: + requires: + - build + - npm-grep: + requires: + - build + - npm-eslint-plugin-dev: + requires: + - build + - npm-cypress-schematic: + requires: + - build + - v8-integration-tests: + requires: + - system-tests-node-modules-install + + - ready-to-release: + # filters: *mainBuildFilters + requires: + - check-ts + - npm-angular + - npm-eslint-plugin-dev + - npm-puppeteer-unit-tests + - npm-puppeteer-cypress-tests + - npm-react + - npm-mount-utils + - npm-grep + - npm-vue + - npm-webpack-batteries-included-preprocessor + - npm-webpack-preprocessor + - npm-vite-dev-server + - npm-vite-plugin-cypress-esm + - npm-webpack-dev-server + - npm-cypress-schematic + - lint-types + - linux-lint + - percy-finalize + - driver-integration-tests-firefox + - driver-integration-tests-chrome + - driver-integration-tests-chrome-beta + - driver-integration-tests-chrome-inject-document-domain + - driver-integration-tests-chrome-beta-inject-document-domain + - driver-integration-tests-electron + - driver-integration-tests-webkit + - driver-integration-memory-tests + - system-tests-non-root + - system-tests-firefox + - system-tests-electron + - system-tests-chrome + - system-tests-webkit + - server-performance-tests + - server-integration-tests + - server-unit-tests + - "test binary as a non-root user" + - "test binary as a root user" + - test-types-cypress-and-jest + - test-full-typescript-project + - test-binary-against-kitchensink + - test-npm-module-on-minimum-node-version + - binary-system-tests + - yarn-pnp-preprocessor-system-test + - svelte-webpack-system-test + - test-kitchensink + - unit-tests + - verify-release-readiness + - v8-integration-tests + + - npm-release: + filters: &mainBuildFilters + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + # use the following branch as well to ensure that v8 snapshot cache updates are fully tested + - 'update-v8-snapshot-cache-on-develop' + - 'chore/refactor_cli_to_ts' + context: test-runner:npm-release + requires: + - ready-to-release + + - create-and-trigger-packaging-artifacts: + context: + - test-runner:upload + - test-runner:build-binary + - publish-binary + requires: + - node_modules_install + - wait-for-binary-publish: + type: approval + requires: + - create-and-trigger-packaging-artifacts + - get-published-artifacts: + context: + - publish-binary + - test-runner:commit-status-checks + requires: + - wait-for-binary-publish + # various testing scenarios, like building full binary + # and testing it on a real project + - test-against-staging: + context: test-runner:record-tests + filters: *mainBuildFilters + requires: + - build + - test-kitchensink: + requires: + - build + - test-kitchensink-against-staging: + executor: kitchensink-executor + context: test-runner:record-tests + filters: *mainBuildFilters + requires: + - build + - test-npm-module-on-minimum-node-version: + context: publish-binary + requires: + - get-published-artifacts + - test-types-cypress-and-jest: + context: publish-binary + requires: + - get-published-artifacts + - test-full-typescript-project: + context: publish-binary + requires: + - get-published-artifacts + - test-binary-against-kitchensink: + context: publish-binary + requires: + - get-published-artifacts + - test-npm-module-and-verify-binary: + filters: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-staging: + context: test-runner:record-tests + filters: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-kitchensink-chrome: + filters: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-recipes-firefox: + filters: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-recipes-chrome: + filters: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-recipes: + filters: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-kitchensink-firefox: + filters: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-todomvc-firefox: + filters: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-cypress-realworld-app: + context: test-runner:cypress-record-key + filters: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-as-specific-user: + name: "test binary as a non-root user" + executor: non-root-docker-user + context: publish-binary + requires: + - get-published-artifacts + - test-binary-as-specific-user: + name: "test binary as a root user" + context: publish-binary + requires: + - get-published-artifacts + - binary-system-tests: + context: publish-binary + requires: + - get-published-artifacts + - system-tests-node-modules-install + - yarn-pnp-preprocessor-system-test: + context: publish-binary + requires: + - get-published-artifacts + - system-tests-node-modules-install + - svelte-webpack-system-test: + context: publish-binary + requires: + - get-published-artifacts + - system-tests-node-modules-install + +linux-x64-contributor: + when: + matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> + jobs: + - node_modules_install + - build: + is_contributor_pr: true + requires: + - node_modules_install + # In subsequent jobs, we use some contexts that are restricted to members of the Cypress organization. + # This job will allow for a Cypress member to approve and run the rest of the restricted jobs in the pipeline after the contributor code has been reviewed. + - contributor-pr: + type: approval + requires: + - build + # verify-accessibility-results is required for status checks, however, it will be skipped for contributors so it + # can run in any order + - verify-accessibility-results + - check-ts: + requires: + - build + - lint: + name: linux-lint + requires: + - build + - percy-finalize: + context: test-runner:percy + required_env_var: PERCY_TOKEN # skips job if not defined (external PR) + requires: + - cli-visual-tests + - reporter-integration-tests + - run-app-component-tests-chrome + - run-app-integration-tests-chrome + - run-frontend-shared-component-tests-chrome + - run-launchpad-component-tests-chrome + - run-launchpad-integration-tests-chrome + - run-reporter-component-tests-chrome + - run-webpack-dev-server-integration-tests + - run-vite-dev-server-integration-tests + - lint-types: + requires: + - build + # unit, integration and e2e tests + - cli-visual-tests: + context: test-runner:percy + requires: + - contributor-pr + - unit-tests: + requires: + - build + - verify-release-readiness: + context: test-runner:npm-release + requires: + - contributor-pr + - server-unit-tests: + requires: + - build + - server-integration-tests: + requires: + - build + - server-performance-tests: + requires: + - build + - system-tests-node-modules-install: + context: test-runner:performance-tracking + requires: + - contributor-pr + - system-tests-chrome: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-electron: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-firefox: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-webkit: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-non-root: + context: test-runner:performance-tracking + executor: non-root-docker-user + requires: + - system-tests-node-modules-install + - driver-integration-tests-chrome: + context: test-runner:cypress-record-key + requires: + - contributor-pr + - driver-integration-tests-chrome-inject-document-domain: + context: test-runner:cypress-record-key + requires: + - contributor-pr + - driver-integration-tests-chrome-beta: + context: test-runner:cypress-record-key + requires: + - contributor-pr + - driver-integration-tests-chrome-beta-inject-document-domain: + context: test-runner:cypress-record-key + requires: + - contributor-pr + - driver-integration-tests-firefox: + context: test-runner:cypress-record-key + requires: + - contributor-pr + - driver-integration-tests-electron: + context: test-runner:cypress-record-key + requires: + - contributor-pr + - driver-integration-tests-webkit: + context: test-runner:cypress-record-key + requires: + - contributor-pr + - driver-integration-memory-tests: + requires: + - build + - run-frontend-shared-component-tests-chrome: + context: + [ + test-runner:cypress-record-key, + test-runner:launchpad-tests, + test-runner:percy + ] + percy: true + requires: + - contributor-pr + - run-launchpad-integration-tests-chrome: + context: + [ + test-runner:cypress-record-key, + test-runner:launchpad-tests, + test-runner:percy + ] + percy: true + requires: + - contributor-pr + - run-launchpad-component-tests-chrome: + context: + [ + test-runner:cypress-record-key, + test-runner:launchpad-tests, + test-runner:percy + ] + percy: true + requires: + - contributor-pr + - run-app-integration-tests-chrome: + context: + [ + test-runner:cypress-record-key, + test-runner:launchpad-tests, + test-runner:percy + ] + percy: true + requires: + - contributor-pr + - run-webpack-dev-server-integration-tests: + context: [ test-runner:cypress-record-key, test-runner:percy ] + requires: + - system-tests-node-modules-install + - run-vite-dev-server-integration-tests: + context: [ test-runner:cypress-record-key, test-runner:percy ] + requires: + - system-tests-node-modules-install + - run-app-component-tests-chrome: + context: + [ + test-runner:cypress-record-key, + test-runner:launchpad-tests, + test-runner:percy + ] + percy: true + requires: + - contributor-pr + - run-reporter-component-tests-chrome: + context: [ test-runner:cypress-record-key, test-runner:percy ] + percy: true + requires: + - contributor-pr + - reporter-integration-tests: + context: [ test-runner:cypress-record-key, test-runner:percy ] + requires: + - contributor-pr + - npm-webpack-dev-server: + requires: + - system-tests-node-modules-install + - npm-vite-dev-server: + requires: + - build + - npm-vite-plugin-cypress-esm: + requires: + - build + - npm-webpack-preprocessor: + requires: + - build + - npm-webpack-batteries-included-preprocessor: + requires: + - build + - npm-vue: + requires: + - build + - npm-puppeteer-unit-tests: + requires: + - build + - npm-puppeteer-cypress-tests: + requires: + - build + - npm-react: + requires: + - build + - npm-angular: + requires: + - build + - npm-mount-utils: + requires: + - build + - npm-grep: + requires: + - build + - npm-eslint-plugin-dev: + requires: + - build + - npm-cypress-schematic: + requires: + - build + - v8-integration-tests: + requires: + - system-tests-node-modules-install + + - ready-to-release: + requires: + - check-ts + - npm-angular + - npm-eslint-plugin-dev + - npm-puppeteer-unit-tests + - npm-puppeteer-cypress-tests + - npm-react + - npm-mount-utils + - npm-grep + - npm-vue + - npm-webpack-batteries-included-preprocessor + - npm-webpack-preprocessor + - npm-vite-dev-server + - npm-vite-plugin-cypress-esm + - npm-webpack-dev-server + - npm-cypress-schematic + - lint-types + - linux-lint + - percy-finalize + - driver-integration-tests-firefox + - driver-integration-tests-chrome + - driver-integration-tests-chrome-beta + - driver-integration-tests-electron + - driver-integration-tests-webkit + - driver-integration-memory-tests + - system-tests-non-root + - system-tests-firefox + - system-tests-electron + - system-tests-chrome + - system-tests-webkit + - server-performance-tests + - server-integration-tests + - server-unit-tests + - "test binary as a non-root user" + - "test binary as a root user" + - test-types-cypress-and-jest + - test-full-typescript-project + - test-binary-against-kitchensink + - test-npm-module-on-minimum-node-version + - binary-system-tests + - test-kitchensink + - unit-tests + - verify-release-readiness + - v8-integration-tests + + - npm-release: + context: test-runner:npm-release + requires: + - ready-to-release + + - create-and-trigger-packaging-artifacts: + context: [ test-runner:upload, test-runner:build-binary, publish-binary ] + requires: + - contributor-pr + - get-published-artifacts: + context: [ publish-binary, test-runner:commit-status-checks ] + requires: + - create-and-trigger-packaging-artifacts + # various testing scenarios, like building full binary + # and testing it on a real project + - test-against-staging: + context: test-runner:record-tests + filters: *mainBuildFilters + requires: + - build + - test-kitchensink: + requires: + - build + - test-kitchensink-against-staging: + executor: kitchensink-executor + context: test-runner:record-tests + filters: *mainBuildFilters + requires: + - build + - test-npm-module-on-minimum-node-version: + context: publish-binary + requires: + - get-published-artifacts + - test-types-cypress-and-jest: + context: publish-binary + requires: + - get-published-artifacts + - test-full-typescript-project: + context: publish-binary + requires: + - get-published-artifacts + - test-binary-against-kitchensink: + context: publish-binary + requires: + - get-published-artifacts + - test-npm-module-and-verify-binary: + filters: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-staging: + context: test-runner:record-tests + filters: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-kitchensink-chrome: + filters: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-recipes-firefox: + filters: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-recipes-chrome: + filters: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-recipes: + filters: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-kitchensink-firefox: + filters: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-todomvc-firefox: + filters: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-cypress-realworld-app: + context: test-runner:cypress-record-key + filters: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-as-specific-user: + name: "test binary as a non-root user" + executor: non-root-docker-user + context: publish-binary + requires: + - get-published-artifacts + - test-binary-as-specific-user: + name: "test binary as a root user" + context: publish-binary + requires: + - get-published-artifacts + - binary-system-tests: + context: publish-binary + requires: + - get-published-artifacts + - system-tests-node-modules-install + +linux-arm64: + when: &full-workflow-filters + jobs: + - node_modules_install: + name: linux-arm64-node-modules-install + executor: linux-arm64 + resource_class: arm.medium + only-cache-for-root-user: true + + - build: + name: linux-arm64-build + context: test-runner:env-canary + executor: linux-arm64 + resource_class: arm.medium + requires: + - linux-arm64-node-modules-install + + - create-and-trigger-packaging-artifacts: + name: linux-arm64-create-and-trigger-packaging-artifacts + context: + [ + test-runner:upload, + test-runner:commit-status-checks, + test-runner:build-binary, + publish-binary + ] + executor: linux-arm64 + resource_class: arm.medium + requires: + - linux-arm64-node-modules-install + + - wait-for-binary-publish: + name: linux-arm64-wait-for-binary-publish + type: approval + requires: + - linux-arm64-create-and-trigger-packaging-artifacts + + - get-published-artifacts: + name: linux-arm64-get-published-artifacts + context: [ publish-binary, test-runner:commit-status-checks ] + executor: linux-arm64 + resource_class: arm.medium + requires: + - linux-arm64-wait-for-binary-publish + + - v8-integration-tests: + executor: linux-arm64 + resource_class: arm.medium + requires: + - linux-arm64-build + - driver-integration-memory-tests: + executor: linux-arm64 + resource_class: arm.medium + requires: + - linux-arm64-build + - server-unit-tests-cloud-environment: + executor: linux-arm64 + resource_class: arm.medium + requires: + - linux-arm64-build + +darwin-x64: + when: &full-workflow-filters + or: + - 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: [ 'chore/migrate-electron-lib-ts', << pipeline.git.branch >> ] + - matches: + pattern: /^release\/\d+\.\d+\.\d+$/ + value: << pipeline.git.branch >> + jobs: + - node_modules_install: + name: darwin-x64-node-modules-install + executor: darwin-amd64 + resource_class: cypress-io/intel-macstadium + only-cache-for-root-user: true + + - build: + name: darwin-x64-build + context: test-runner:env-canary + executor: darwin-amd64 + resource_class: cypress-io/intel-macstadium + requires: + - darwin-x64-node-modules-install + + - create-build-artifacts: + name: darwin-x64-create-build-artifacts + context: + - test-runner:sign-mac-binary + - test-runner:upload + - test-runner:commit-status-checks + - test-runner:build-binary + executor: darwin-amd64 + resource_class: cypress-io/intel-macstadium + requires: + - darwin-x64-build + + - v8-integration-tests: + name: darwin-x64-v8-integration-tests + executor: darwin-amd64 + resource_class: cypress-io/intel-macstadium + requires: + - darwin-x64-build + + - driver-integration-memory-tests: + name: darwin-x64-driver-integration-memory-tests + executor: darwin-amd64 + resource_class: cypress-io/intel-macstadium + requires: + - darwin-x64-build + + - server-unit-tests-cloud-environment: + name: darwin-x64-driver-server-unit-tests-cloud-environment + executor: darwin-amd64 + resource_class: cypress-io/intel-macstadium + requires: + - darwin-x64-build + +darwin-arm64: + when: &full-workflow-filters + jobs: + - node_modules_install: + name: darwin-arm64-node-modules-install + executor: darwin-arm64 + resource_class: cypress-io/m1-macstadium + only-cache-for-root-user: true + + - build: + name: darwin-arm64-build + context: test-runner:env-canary + executor: darwin-arm64 + resource_class: cypress-io/m1-macstadium + requires: + - darwin-arm64-node-modules-install + + - create-build-artifacts: + name: darwin-arm64-create-build-artifacts + context: + - test-runner:sign-mac-binary + - test-runner:upload + - test-runner:commit-status-checks + - test-runner:build-binary + executor: darwin-arm64 + resource_class: cypress-io/m1-macstadium + requires: + - darwin-arm64-build + + - v8-integration-tests: + name: darwin-arm64-v8-integration-tests + executor: darwin-arm64 + resource_class: cypress-io/m1-macstadium + requires: + - darwin-arm64-build + - driver-integration-memory-tests: + name: darwin-arm64-driver-integration-memory-tests + executor: darwin-arm64 + resource_class: cypress-io/m1-macstadium + requires: + - darwin-arm64-build + - server-unit-tests-cloud-environment: + name: darwin-arm64-server-unit-tests-cloud-environment + executor: darwin-arm64 + resource_class: cypress-io/m1-macstadium + requires: + - darwin-arm64-build + +windows: + when: &full-workflow-filters + jobs: + - node_modules_install: + name: windows-node-modules-install + executor: windows + resource_class: windows.medium + only-cache-for-root-user: true + + - build: + name: windows-build + context: test-runner:env-canary + executor: windows + resource_class: windows.large + requires: + - windows-node-modules-install + + - run-app-integration-tests-chrome: + name: windows-run-app-integration-tests-chrome + executor: windows + 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.large + context: [ test-runner:cypress-record-key, test-runner:launchpad-tests ] + requires: + - windows-build + + - unit-tests: + name: windows-unit-tests + executor: windows + resource_class: windows.medium + requires: + - windows-build + + - server-unit-tests-cloud-environment: + name: windows-server-unit-tests-cloud-environment + executor: windows + resource_class: windows.medium + requires: + - windows-build + + - create-build-artifacts: + name: windows-create-build-artifacts + executor: windows + resource_class: windows.large + context: + - test-runner:sign-windows-binary + - test-runner:upload + - test-runner:commit-status-checks + - test-runner:build-binary + requires: + - windows-build + + - test-binary-against-kitchensink-chrome: + name: windows-test-binary-against-kitchensink-chrome + executor: windows + requires: + - windows-create-build-artifacts + + - v8-integration-tests: + name: windows-v8-integration-tests + executor: windows + resource_class: windows.medium + requires: + - windows-build + - driver-integration-memory-tests: + name: windows-driver-integration-memory-tests + executor: windows + resource_class: windows.medium + requires: + - windows-build diff --git a/.circleci/workflows-src/workflows/pull-request.yml b/.circleci/workflows-src/workflows/pull-request.yml new file mode 100644 index 00000000000..d3dbb6d5592 --- /dev/null +++ b/.circleci/workflows-src/workflows/pull-request.yml @@ -0,0 +1,310 @@ +pull-request: + when: + - matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> + + jobs: + - node_modules_install: + build-better-sqlite3: true + - build: + context: test-runner:env-canary + requires: + - node_modules_install + - check-ts: + requires: + - build + - lint: + name: linux-lint + requires: + - build + - percy-finalize: + context: test-runner:percy + required_env_var: PERCY_TOKEN + requires: + - cli-visual-tests + - reporter-integration-tests + - run-app-component-tests-chrome + - run-app-integration-tests-chrome + - run-frontend-shared-component-tests-chrome + - run-launchpad-component-tests-chrome + - run-launchpad-integration-tests-chrome + - run-reporter-component-tests-chrome + - run-webpack-dev-server-integration-tests + - run-vite-dev-server-integration-tests + # Cypress run must be completed to fetch Accessibility report + - verify-accessibility-results: + context: test-runner:cypress-record-key + requires: + - reporter-integration-tests + - run-app-component-tests-chrome + - run-app-integration-tests-chrome + - run-frontend-shared-component-tests-chrome + - run-launchpad-component-tests-chrome + - run-launchpad-integration-tests-chrome + - run-reporter-component-tests-chrome + - run-webpack-dev-server-integration-tests + - run-vite-dev-server-integration-tests + - driver-integration-tests-firefox + - driver-integration-tests-chrome + - driver-integration-tests-chrome-inject-document-domain + - driver-integration-tests-chrome-beta-inject-document-domain + - driver-integration-tests-electron + - driver-integration-tests-webkit + - driver-integration-memory-tests + - lint-types: + requires: + - build + # unit, integration and e2e tests + - cli-visual-tests: + context: test-runner:percy + requires: + - build + - unit-tests: + requires: + - build + - verify-release-readiness: + context: test-runner:npm-release + requires: + - build + - server-unit-tests: + requires: + - build + - server-integration-tests: + requires: + - build + - server-performance-tests: + requires: + - build + - system-tests-node-modules-install: + context: test-runner:performance-tracking + requires: + - build + - system-tests-chrome: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-electron: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-firefox: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-webkit: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-non-root: + context: test-runner:performance-tracking + executor: non-root-docker-user + requires: + - system-tests-node-modules-install + - driver-integration-tests-chrome: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-chrome-inject-document-domain: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-chrome-beta: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-chrome-beta-inject-document-domain: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-firefox: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-electron: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-webkit: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-memory-tests: + requires: + - build + - run-frontend-shared-component-tests-chrome: + context: + [ + test-runner:cypress-record-key, + test-runner:launchpad-tests, + test-runner:percy + ] + percy: true + requires: + - build + - run-launchpad-integration-tests-chrome: + context: + [ + test-runner:cypress-record-key, + test-runner:launchpad-tests, + test-runner:percy + ] + percy: true + requires: + - build + - run-launchpad-component-tests-chrome: + context: + [ + test-runner:cypress-record-key, + test-runner:launchpad-tests, + test-runner:percy + ] + percy: true + requires: + - build + - run-app-integration-tests-chrome: + context: + [ + test-runner:cypress-record-key, + test-runner:launchpad-tests, + test-runner:percy + ] + percy: true + requires: + - build + - run-webpack-dev-server-integration-tests: + context: [ test-runner:cypress-record-key, test-runner:percy ] + requires: + - system-tests-node-modules-install + - run-vite-dev-server-integration-tests: + context: [ test-runner:cypress-record-key, test-runner:percy ] + requires: + - system-tests-node-modules-install + - run-app-component-tests-chrome: + context: + [ + test-runner:cypress-record-key, + test-runner:launchpad-tests, + test-runner:percy + ] + percy: true + requires: + - build + - run-reporter-component-tests-chrome: + context: [ test-runner:cypress-record-key, test-runner:percy ] + percy: true + requires: + - build + - reporter-integration-tests: + context: [ test-runner:cypress-record-key, test-runner:percy ] + requires: + - build + - npm-webpack-dev-server: + requires: + - system-tests-node-modules-install + - npm-vite-dev-server: + requires: + - build + - npm-vite-plugin-cypress-esm: + requires: + - build + - npm-webpack-preprocessor: + requires: + - build + - npm-webpack-batteries-included-preprocessor: + requires: + - build + - npm-vue: + requires: + - build + - npm-puppeteer-unit-tests: + requires: + - build + - npm-puppeteer-cypress-tests: + requires: + - build + - npm-react: + requires: + - build + - npm-angular: + requires: + - build + - npm-mount-utils: + requires: + - build + - npm-grep: + requires: + - build + - npm-eslint-plugin-dev: + requires: + - build + - npm-cypress-schematic: + requires: + - build + - v8-integration-tests: + requires: + - system-tests-node-modules-install + + - create-and-trigger-packaging-artifacts: + context: + - test-runner:upload + - test-runner:build-binary + - publish-binary + requires: + - node_modules_install + - wait-for-binary-publish: + type: approval + requires: + - create-and-trigger-packaging-artifacts + - get-published-artifacts: + context: + - publish-binary + - test-runner:commit-status-checks + requires: + - wait-for-binary-publish + - test-kitchensink: + requires: + - build + - test-kitchensink-against-staging: + - test-npm-module-on-minimum-node-version: + context: publish-binary + requires: + - get-published-artifacts + - test-types-cypress-and-jest: + context: publish-binary + requires: + - get-published-artifacts + - test-full-typescript-project: + context: publish-binary + requires: + - get-published-artifacts + - test-binary-against-kitchensink: + context: publish-binary + requires: + - get-published-artifacts + - test-binary-as-specific-user: + name: "test binary as a non-root user" + executor: non-root-docker-user + context: publish-binary + requires: + - get-published-artifacts + - test-binary-as-specific-user: + name: "test binary as a root user" + context: publish-binary + requires: + - get-published-artifacts + - binary-system-tests: + context: publish-binary + requires: + - get-published-artifacts + - system-tests-node-modules-install + - yarn-pnp-preprocessor-system-test: + context: publish-binary + requires: + - get-published-artifacts + - system-tests-node-modules-install + - svelte-webpack-system-test: + context: publish-binary + requires: + - get-published-artifacts + - system-tests-node-modules-install diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index f687b0feedf..b621ef53d8e 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -1,413 +1,256 @@ -version: 2.1 - -chrome-stable-version: &chrome-stable-version "140.0.7339.80" -chrome-beta-version: &chrome-beta-version "140.0.7339.41" -firefox-stable-version: &firefox-stable-version "142.0" - -orbs: - browser-tools: circleci/browser-tools@2.1.1 - -defaults: &defaults - parallelism: 1 - working_directory: ~/cypress - parameters: &defaultsParameters - executor: - type: executor - default: cy-doc - only-cache-for-root-user: - type: boolean - default: false - executor: <> - environment: - ## set specific timezone - &defaultsEnvironment - TZ: "/usr/share/zoneinfo/America/New_York" - - ## store artifacts here - CIRCLE_ARTIFACTS: /tmp/artifacts - - ## set so that e2e tests are consistent - COLUMNS: 100 - LINES: 24 - -mainBuildFilters: &mainBuildFilters - filters: - branches: - only: - - develop - - /^release\/\d+\.\d+\.\d+$/ - # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - - 'update-v8-snapshot-cache-on-develop' - - 'chore/refactor_cli_to_ts' - -# 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 -# so just add your branch to the list here to build and test on Mac -macWorkflowFilters: &darwin-workflow-filters - when: - or: - - 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: [ 'chore/migrate-electron-lib-ts', << pipeline.git.branch >> ] - - matches: - pattern: /^release\/\d+\.\d+\.\d+$/ - value: << pipeline.git.branch >> - -linuxArm64WorkflowFilters: &linux-arm64-workflow-filters - when: - or: - - 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: [ 'chore/migrate-electron-lib-ts', << pipeline.git.branch >> ] - - matches: - pattern: /^release\/\d+\.\d+\.\d+$/ - value: << pipeline.git.branch >> - -# uncomment & add to the branch conditions below to disable the main linux -# flow if we don't want to test it for a certain branch -linuxWorkflowExcludeFilters: &linux-x64-workflow-exclude-filters - unless: - or: - - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> - - false - -# windows is slow and expensive in CI, so it normally only runs on main branches -# add your branch to this list to run the full Windows build on your PR -windowsWorkflowFilters: &windows-workflow-filters - when: - or: - - 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: [ 'chore/migrate-electron-lib-ts', << pipeline.git.branch >> ] - - matches: - pattern: /^release\/\d+\.\d+\.\d+$/ - value: << pipeline.git.branch >> - -executors: - # the Docker image with Cypress dependencies and Chrome browser - cy-doc: - docker: - - image: cypress/base-internal:22.15.1-bullseye - # by default, we use "medium" to balance performance + CI costs. bump or reduce on a per-job basis if needed. - resource_class: medium - environment: - PLATFORM: linux - - kitchensink-executor: - docker: - - image: cypress/base-internal:22.15.1-bullseye - # by default, we use "medium" to balance performance + CI costs. bump or reduce on a per-job basis if needed. - resource_class: medium - environment: - PLATFORM: linux - - # Docker image with non-root "node" user - non-root-docker-user: - docker: - - image: cypress/base-internal:22.15.1-bullseye - user: node - environment: - PLATFORM: linux - - # executor to run on Mac OS - # https://circleci.com/docs/2.0/executor-types/#using-macos - # https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions - darwin-amd64: - machine: true - environment: - PLATFORM: darwin - - # executor to run on Windows - based off of the windows-orb default executor since it is - # not customizable enough to align with our existing setup. - # https://github.com/CircleCI-Public/windows-orb/blob/master/src/executors/default.yml - # https://circleci.com/docs/2.0/hello-world-windows/#software-pre-installed-in-the-windows-image - windows: &windows-executor - machine: - image: windows-server-2022-gui:stable - shell: bash.exe -eo pipefail - resource_class: windows.large - environment: - PLATFORM: windows - - darwin-arm64: &darwin-arm64-executor - machine: true - environment: - PLATFORM: darwin - - linux-arm64: &linux-arm64-executor - machine: - image: ubuntu-2004:2024.11.1 - resource_class: arm.medium - environment: - PLATFORM: linux - # TODO: Disabling snapshots for now on Linux Arm 64 architectures. Will revisit with https://github.com/cypress-io/cypress/issues/23557 - DISABLE_SNAPSHOT_REQUIRE: 1 - +chrome-beta-version: 140.0.7339.41 +chrome-stable-version: 140.0.7339.80 commands: - # This command inserts SHOULD_PERSIST_ARTIFACTS into BASH_ENV. This way, we can define the variable in one place and use it in multiple steps. - # Run this command in a job before you want to use the SHOULD_PERSIST_ARTIFACTS variable. - setup_should_persist_artifacts: + build-and-package-binary: steps: - run: - 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" != "chore/refactor_cli_to_ts" ]]; 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 - verify_should_persist_artifacts: - steps: + set -e + NEEDS_CODE_SIGNING_WINDOWS=`node -p 'process.platform === "win32"'` + NEEDS_CODE_SIGNING_MAC=`node -p 'process.platform === "darwin"'` + + if [[ "$NEEDS_CODE_SIGNING_MAC" == "true" ]]; then + echo "Checking for required environment variables..." + if [ -z "$CSC_LINK" ]; then + echo "Need to provide environment variable CSC_LINK" + echo "with base64 encoded certificate .p12 file" + exit 1 + fi + if [ -z "$CSC_KEY_PASSWORD" ]; then + echo "Need to provide environment variable CSC_KEY_PASSWORD" + echo "with password for unlocking certificate .p12 file" + exit 1 + fi + echo "Succeeded." + elif [[ "$NEEDS_CODE_SIGNING_WINDOWS" == "true" ]]; then + echo "Checking for required environment variables..." + if [ -z "$WINDOWS_SIGN_USER_NAME" ]; then + echo "Need to provide environment variable WINDOWS_SIGN_USER_NAME" + echo "with password for fetching and signing certificate" + exit 1 + fi + if [ -z "$WINDOWS_SIGN_USER_PASSWORD" ]; then + echo "Need to provide environment variable WINDOWS_SIGN_USER_PASSWORD" + echo "for fetching and signing certificate" + exit 1 + fi + if [ -z "$WINDOWS_SIGN_CREDENTIAL_ID" ]; then + echo "Need to provide environment variable WINDOWS_SIGN_CREDENTIAL_ID" + echo "for identifying certificate" + exit 1 + fi + if [ -z "$WINDOWS_SIGN_USER_TOTP" ]; then + echo "Need to provide environment variable WINDOWS_SIGN_USER_TOTP" + echo "for signing certificate" + exit 1 + fi + echo "Succeeded." + else + echo "Not code signing for this platform" + fi + name: Check environment variables before code sign (if on Mac/Windows) - run: - name: Check current branch to persist artifacts command: | - if [[ -z "$SHOULD_PERSIST_ARTIFACTS" ]]; then - echo "Not uploading artifacts or posting install comment for this branch." - circleci-agent step halt + 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) + else + yarn binary-build --version $(node ./scripts/get-next-version.js) fi - - maybe_skip_binary_jobs: - steps: + name: Build the Cypress binary + no_output_timeout: 45m - run: - name: Skip binary job if external PR command: | - if [[ -z "$CIRCLE_TOKEN" ]]; then - echo "There is no CIRCLE_TOKEN set for this job. Cannot trigger binary build. Skipping job." - circleci-agent step halt + 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-package --version $(node ./scripts/get-next-version.js) + else + yarn binary-package --version $(node ./scripts/get-next-version.js) fi - - restore_workspace_binaries: - steps: - - attach_workspace: - at: ~/ - # make sure we have cypress.zip received - - run: ls -l - - run: ls -l cypress.zip cypress.tgz - - run: node --version - - run: npm --version - - restore_cached_workspace: - steps: - - attach_workspace: - at: ~/ - - install-required-node - - unpack-dependencies - - restore_cached_binary: - steps: - - attach_workspace: - at: ~/ - - prepare-modules-cache: - parameters: - dont-move: - type: boolean - default: false - steps: - - run: node scripts/circle-cache.js --action prepare - - unless: - condition: << parameters.dont-move >> - steps: - - run: - name: Move to /tmp dir for consistent caching across root/non-root users - command: | - mkdir -p /tmp/node_modules_cache - mv ~/cypress/node_modules /tmp/node_modules_cache/root_node_modules - mv ~/cypress/cli/node_modules /tmp/node_modules_cache/cli_node_modules - mv ~/cypress/system-tests/node_modules /tmp/node_modules_cache/system-tests_node_modules - mv ~/cypress/globbed_node_modules /tmp/node_modules_cache/globbed_node_modules - - install-webkit-deps: - steps: + environment: + DEBUG: electron-builder,electron-osx-sign*,electron-notarize* + name: Package the Cypress binary + no_output_timeout: 45m - run: - name: Install WebKit dependencies command: | - npx playwright install webkit - npx playwright install-deps webkit - + source ./scripts/ensure-node.sh + node --version + yarn binary-smoke-test --version $(node ./scripts/get-next-version.js) + name: Smoke Test the Cypress binary + - run: + command: | + if [[ $PLATFORM == 'linux' ]]; then + # on Arm, CI runs as non-root, on x64 CI runs as root but there is no sudo binary + if [[ `whoami` == 'root' ]]; then + apt-get update && apt-get install -y zip + else + sudo apt-get update && sudo apt-get install -y zip + fi + fi + source ./scripts/ensure-node.sh + yarn binary-zip + name: Zip the binary + - persist_to_workspace: + paths: + - cypress/cypress.zip + root: ~/ build-and-persist: description: Save entire folder as artifact for other jobs to run without reinstalling steps: - run: - name: Sync Cloud Validations command: | source ./scripts/ensure-node.sh yarn gulp syncCloudValidations + name: Sync Cloud Validations - run: - name: Build packages command: | source ./scripts/ensure-node.sh yarn build + name: Build packages - run: - name: Generate v8 snapshot command: | source ./scripts/ensure-node.sh # Minification takes some time. We only really need to do that for the binary (and we regenerate snapshots separately there) V8_UPDATE_METAFILE=1 V8_SNAPSHOT_DISABLE_MINIFY=1 yarn build-v8-snapshot-prod - - prepare-modules-cache # So we don't throw these in the workspace cache + name: Generate v8 snapshot + - prepare-modules-cache - persist_to_workspace: - root: ~/ paths: - cypress - - install_cache_helpers_dependencies: + root: ~/ + build-better-sqlite3: + description: Build better-sqlite3 for glibc 2.31 steps: + - setup_remote_docker - run: - # Dependencies needed by circle-cache.js, before we "yarn" or unpack cached node_modules - name: Cache Helper Dependencies - working_directory: ~/ - command: npm i glob@7.1.6 fs-extra@10.0.0 minimist@1.2.5 - fast-json-stable-stringify@2.1.0 - - unpack-dependencies: - description: 'Unpacks dependencies associated with the current workflow' - steps: - - install_cache_helpers_dependencies - - run: - name: Generate Circle Cache Key - command: node scripts/circle-cache.js --action cacheKey > circle_cache_key - - run: - name: Generate platform key - command: node ./scripts/get-platform-key.js > platform_key - - restore_cache: - name: Restore cache state, to check for known modules cache existence - key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" - }}-node-modules-cache-{{ checksum "circle_cache_key" }} - - run: - name: Move node_modules back from /tmp command: | - if [[ -d "/tmp/node_modules_cache" ]]; then - mv /tmp/node_modules_cache/root_node_modules ~/cypress/node_modules - mv /tmp/node_modules_cache/cli_node_modules ~/cypress/cli/node_modules - mv /tmp/node_modules_cache/system-tests_node_modules ~/cypress/system-tests/node_modules - mv /tmp/node_modules_cache/globbed_node_modules ~/cypress/globbed_node_modules - rm -rf /tmp/node_modules_cache + if [[ ! -f better_sqlite3.node ]]; then + set -x + apt update && apt install -y docker.io + docker run -d --name better-sqlite3-builder cypress/base-internal:22.15.1-glibc2.31 /bin/bash -c "sleep 1000000000" + docker cp ~/cypress/node_modules/better-sqlite3 better-sqlite3-builder:/better-sqlite3 + docker exec -it better-sqlite3-builder /bin/bash -c "cd /better-sqlite3 && source /root/.bashrc && chown -R root:root . && npm install --ignore-scripts && npx --no-install prebuild -r electron -t 36.4.0 --include-regex 'better_sqlite3.node$'" + docker cp better-sqlite3-builder:/better-sqlite3/build/Release/better_sqlite3.node ~/cypress/node_modules/better-sqlite3/build/Release/better_sqlite3.node + docker rm -f better-sqlite3-builder + cp ~/cypress/node_modules/better-sqlite3/build/Release/better_sqlite3.node ~/cypress/better_sqlite3.node + else + cp ~/cypress/better_sqlite3.node ~/cypress/node_modules/better-sqlite3/build/Release/better_sqlite3.node fi + name: Build better-sqlite3 for glibc 2.31 + - save_cache: + key: better-sqlite3-{{ checksum "node_modules/better-sqlite3/package.json" }}-{{ + checksum "node_modules/electron/package.json" }} + paths: + - better_sqlite3.node - run: - name: Restore all node_modules to proper workspace folders - command: node scripts/circle-cache.js --action unpack - - restore_cached_system_tests_deps: - description: 'Restore the cached node_modules for projects in - "system-tests/projects/**"' + command: | + rm ~/cypress/better_sqlite3.node + name: Clean up top level better-sqlite3 file + build-cypress-npm-package: + parameters: + executor: + default: cy-doc + type: executor steps: - run: - name: Generate Circle Cache key for system tests - command: ./system-tests/scripts/cache-key.sh > system_tests_cache_key + command: | + source ./scripts/ensure-node.sh + yarn get-next-version --npm + name: Bump NPM version - run: - name: Generate platform key - command: node ./scripts/get-platform-key.js > platform_key - - restore_cache: - name: Restore system tests node_modules cache - keys: - - v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum - "platform_key" }}-system-tests-projects-node-modules-cache-{{ - checksum "system_tests_cache_key" }} - - update_cached_system_tests_deps: - description: 'Update the cached node_modules for projects in "system-tests/projects/**"' - steps: + command: | + source ./scripts/ensure-node.sh + yarn lerna run build-cli + name: Build NPM package - run: - name: Generate Circle Cache key for system tests - command: ./system-tests/scripts/cache-key.sh > system_tests_cache_key + command: ls -la types + working_directory: cli/build - run: - name: Generate platform key - command: node ./scripts/get-platform-key.js > platform_key - - restore_cache: - name: Restore cache state, to check for known modules cache existence - keys: - - v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum - "platform_key" - }}-state-of-system-tests-projects-node-modules-cache-{{ checksum - "system_tests_cache_key" }} + command: ls -la vue mount-utils react + working_directory: cli/build + - unless: + condition: + equal: + - environment: + PLATFORM: windows + machine: + image: windows-server-2022-gui:stable + shell: bash.exe -eo pipefail + resource_class: windows.large + - << parameters.executor >> + steps: + - run: + command: | + source ./scripts/ensure-node.sh + yarn workspace cypress size + name: list NPM package contents - run: - name: Bail if specific cache exists - command: | - if [[ -f "/tmp/system_tests_node_modules_installed" ]]; then - echo "No updates to system tests node modules, exiting" - circleci-agent step halt - fi - - restore_cache: - name: Restore system tests node_modules cache - keys: - - v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum - "platform_key" }}-system-tests-projects-node-modules-cache-{{ - checksum "system_tests_cache_key" }} - - v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum - "platform_key" }}-system-tests-projects-node-modules-cache- + command: yarn pack --filename ../../cypress.tgz + name: pack NPM package + working_directory: cli/build - run: - name: Update system-tests node_modules cache - command: yarn workspace @tooling/system-tests projects:yarn:install - - save_cache: - name: Save system tests node_modules cache - key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" - }}-system-tests-projects-node-modules-cache-{{ checksum - "system_tests_cache_key" }} - paths: - - /tmp/cy-system-tests-node-modules - - run: touch /tmp/system_tests_node_modules_installed - - save_cache: - name: Save system tests node_modules cache state key - key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" - }}-state-of-system-tests-projects-node-modules-cache-{{ checksum - "system_tests_cache_key" }} + command: ls -l + name: list created NPM package + - persist_to_workspace: paths: - - /tmp/system_tests_node_modules_installed - + - cypress/cypress.tgz + root: ~/ caching-dependency-installer: - description: 'Installs & caches the dependencies based on yarn lock & package - json dependencies' + description: Installs & caches the dependencies based on yarn lock & package + json dependencies parameters: - only-cache-for-root-user: - type: boolean - default: false build-better-sqlite3: + default: false type: boolean + only-cache-for-root-user: default: false + type: boolean steps: - install_cache_helpers_dependencies - run: - name: Generate Circle Cache Key command: node scripts/circle-cache.js --action cacheKey > circle_cache_key + name: Generate Circle Cache Key - run: - name: Generate platform key command: node ./scripts/get-platform-key.js > platform_key + name: Generate platform key - when: condition: <> steps: - restore_cache: - name: Restore cache state, to check for known modules cache existence key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-state-of-node-modules-cache-{{ checksum "circle_cache_key" }}-better-sqlite3 + name: Restore cache state, to check for known modules cache existence - unless: condition: <> steps: - restore_cache: - name: Restore cache state, to check for known modules cache existence key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-state-of-node-modules-cache-{{ checksum "circle_cache_key" }} + name: Restore cache state, to check for known modules cache existence - run: - name: Bail if cache exists command: | if [[ -f "node_modules_installed" ]]; then echo "Node modules already cached for dependencies, exiting" circleci-agent step halt fi + name: Bail if cache exists - run: date +%Y-%U > cache_date - restore_cache: - name: Restore weekly yarn cache keys: - v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-deps-root-weekly-{{ checksum "cache_date" }} + name: Restore weekly yarn cache - run: - name: Install Node Modules command: | if [[ `node ./scripts/get-platform-key.js` == 'linux-arm64' ]]; then # Building better-sqlite3 on arm64 requires gcc-10 @@ -432,20 +275,21 @@ commands: # https://docs.percy.io/docs/caching-asset-discovery-browser-in-ci PERCY_POSTINSTALL_BROWSER=true \ yarn --prefer-offline --frozen-lockfile --cache-folder ~/.yarn + name: Install Node Modules no_output_timeout: 20m - when: condition: <> steps: - build-better-sqlite3 - prepare-modules-cache: - dont-move: <> # we don't move, so we don't hit any issues unpacking symlinks + dont-move: <> - when: - condition: <> # we don't move to /tmp since we don't need to worry about different users + condition: <> steps: - save_cache: - name: Saving node modules for root, cli, and all globbed workspace packages key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-node-modules-cache-{{ checksum "circle_cache_key" }} + name: Saving node modules for root, cli, and all globbed workspace packages paths: - node_modules - cli/node_modules @@ -455,9 +299,9 @@ commands: condition: <> steps: - save_cache: - name: Saving node modules for root, cli, and all globbed workspace packages key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-node-modules-cache-{{ checksum "circle_cache_key" }} + name: Saving node modules for root, cli, and all globbed workspace packages paths: - /tmp/node_modules_cache - run: touch node_modules_installed @@ -465,250 +309,337 @@ commands: condition: <> steps: - save_cache: - name: Saving node-modules cache state key key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-state-of-node-modules-cache-{{ checksum "circle_cache_key" }}-better-sqlite3 + name: Saving node-modules cache state key paths: - node_modules_installed - unless: condition: <> steps: - save_cache: - name: Saving node-modules cache state key key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-state-of-node-modules-cache-{{ checksum "circle_cache_key" }} + name: Saving node-modules cache state key paths: - node_modules_installed - save_cache: - name: Save weekly yarn cache key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-deps-root-weekly-{{ checksum "cache_date" }} + name: Save weekly yarn cache paths: - ~/.yarn - ~/.cy-npm-cache - - verify-build-setup: - description: Common commands run when setting up for build or yarn install - parameters: - executor: - type: executor - default: cy-doc + check-if-binary-exists: steps: - - run: pwd - ##- run: - ## name: print global yarn cache path and size - ## command: du -sh $(yarn global bin) - - run: - name: print yarn version - command: yarn versions - - unless: - condition: - # stop-only does not correctly match on windows: https://github.com/bahmutov/stop-only/issues/78 - equal: [ *windows-executor, << parameters.executor >> ] - steps: - - run: - name: Stop .only # this will catch ".only"s in js/coffee as well - command: | - source ./scripts/ensure-node.sh - yarn stop-only-all + - run-on-dependencies: + command: build + package: internal-scripts - run: - name: Check terminal variables - ## make sure the TERM is set to 'xterm' in node (Linux only) - ## else colors (and tests) will fail - ## See the following information - ## * http://andykdocs.de/development/Docker/Fixing+the+Docker+TERM+variable+issue - ## * https://unix.stackexchange.com/questions/43945/whats-the-difference-between-various-term-variables command: | source ./scripts/ensure-node.sh - yarn check-terminal - - install-required-node: - # https://discuss.circleci.com/t/switch-nodejs-version-on-machine-executor-solved/26675/2 - description: Install Node version matching .node-version + yarn gulp e2eTestScaffold + yarn check-binary-on-cdn --version $(node ./scripts/get-next-version.js) --type binary --file cypress.zip + name: Check if binary exists, exit if it does + clone-repo-and-checkout-branch: + description: | + Clones an external repo and then checks out the branch that matches the next version otherwise uses 'master' branch. + parameters: + pull_request_id: + default: 0 + description: Pull request number to check out before installing and testing + type: integer + repo: + description: 'Name of the github repo to clone like: cypress-example-kitchensink' + type: string steps: + - restore_cached_binary - run: - name: Install Node - command: | - source ./scripts/ensure-node.sh - echo "Installing Yarn" - npm install yarn --location=global # ensure yarn is installed with the correct node engine - yarn check-node-version - - run: - name: Check Node command: | - source ./scripts/ensure-node.sh - yarn check-node-version + git clone --depth 1 --no-single-branch https://github.com/cypress-io/<>.git . + + cd ~/cypress/.. + # install some deps for get-next-version + npm i semver@7.3.2 conventional-recommended-bump@6.1.0 conventional-changelog-angular@5.0.12 minimist@1.2.5 + NEXT_VERSION=$(node ./cypress/scripts/get-next-version.js) + cd - + git checkout $NEXT_VERSION || true + name: 'Cloning test project and checking out release branch: + <>' + working_directory: /tmp/<> + - when: + condition: <> + steps: + - run: + command: | + git fetch origin pull/<>/head:pr-<> + git checkout pr-<> + name: Check out PR <> + working_directory: /tmp/<> install-browsers: description: Install Google Chrome or Firefox parameters: executor: + default: cy-doc description: The executor in use. Only used if Windows for workaround purposes type: executor - default: cy-doc - install-chrome: - description: whether or not to install google chrome - type: boolean - default: false + firefox-version: + default: "142.0" + description: Firefox version to install + type: string google-chrome-channel: + default: stable description: Google Chrome channel to install type: string - # can be stable, beta, dev, or canary - default: stable + google-chrome-for-testing-version: + default: 140.0.7339.80 + description: Google Chrome for Testing version to install + type: string google-chrome-version: + default: 140.0.7339.80 description: Google Chrome version to install type: string - # latest can also be used here - default: *chrome-stable-version + install-chrome: + default: false + description: whether or not to install google chrome + type: boolean install-chrome-for-testing: + default: false description: whether or not to install google chrome for testing type: boolean - default: false - google-chrome-for-testing-version: - description: Google Chrome for Testing version to install - type: string - # latest can also be used here - default: *chrome-stable-version install-firefox: + default: false description: whether or not to install firefox type: boolean - default: false - firefox-version: - description: Firefox version to install - type: string - # latest can also be used here - default: *firefox-stable-version steps: - when: condition: not: - equal: [ *windows-executor, << parameters.executor >> ] - # see https://circleci.com/developer/orbs/orb/circleci/browser-tools + equal: + - environment: + PLATFORM: windows + machine: + image: windows-server-2022-gui:stable + shell: bash.exe -eo pipefail + resource_class: windows.large + - << parameters.executor >> steps: - when: condition: - equal: [ true, << parameters.install-firefox >> ] + equal: + - true + - << parameters.install-firefox >> steps: - browser-tools/install_firefox: - # https://download-installer.cdn.mozilla.net/pub/firefox/releases/ version: << parameters.firefox-version >> - when: condition: - equal: [ true, << parameters.install-chrome >> ] + equal: + - true + - << parameters.install-chrome >> steps: - browser-tools/install_chrome: - # https://www.ubuntuupdates.org/package/google_chrome/stable/main/base/google-chrome-stable channel: << parameters.google-chrome-channel >> chrome_version: << parameters.google-chrome-version >> - when: condition: - equal: [ 'beta', << parameters.google-chrome-channel>> ] + equal: + - beta + - << parameters.google-chrome-channel>> steps: - run: - # When the beta is downloaded with this orb, - # google-chrome-beta is linked in addition to google-chrome, - # which we do not expect and errors out when running Cypress - name: remove linked google-chrome binary command: | rm /usr/bin/google-chrome + name: remove linked google-chrome binary - when: condition: - equal: [ true, << parameters.install-chrome-for-testing >> ] + equal: + - true + - << parameters.install-chrome-for-testing >> steps: - run: - name: Install unzip command: | apt-get update && apt-get install -y unzip + name: Install unzip - browser-tools/install_chrome_for_testing: - version: << parameters.google-chrome-for-testing-version >> install_chromedriver: false - - # This code builds better-sqlite3 on Debian 11 (Bullseye). This is necessary because Debian 10 has the oldest glibc version (2.31) that we support. - # - # Since this is running Docker remote (because the job running the command may not be using an executor with the appropriate glibc version), we need to - # copy the project into the container, and copy the built plugin out of the container because the host running docker does not have access to the - # project directory so volume mounts are not possible. The built plugin is copied to the project directory so it can be injected into the final binary. - build-better-sqlite3: - description: Build better-sqlite3 for glibc 2.31 + version: << parameters.google-chrome-for-testing-version >> + install-required-node: + description: Install Node version matching .node-version steps: - - setup_remote_docker - run: - name: Build better-sqlite3 for glibc 2.31 command: | - if [[ ! -f better_sqlite3.node ]]; then - set -x - apt update && apt install -y docker.io - docker run -d --name better-sqlite3-builder cypress/base-internal:22.15.1-glibc2.31 /bin/bash -c "sleep 1000000000" - docker cp ~/cypress/node_modules/better-sqlite3 better-sqlite3-builder:/better-sqlite3 - docker exec -it better-sqlite3-builder /bin/bash -c "cd /better-sqlite3 && source /root/.bashrc && chown -R root:root . && npm install --ignore-scripts && npx --no-install prebuild -r electron -t 36.4.0 --include-regex 'better_sqlite3.node$'" - docker cp better-sqlite3-builder:/better-sqlite3/build/Release/better_sqlite3.node ~/cypress/node_modules/better-sqlite3/build/Release/better_sqlite3.node - docker rm -f better-sqlite3-builder - cp ~/cypress/node_modules/better-sqlite3/build/Release/better_sqlite3.node ~/cypress/better_sqlite3.node - else - cp ~/cypress/better_sqlite3.node ~/cypress/node_modules/better-sqlite3/build/Release/better_sqlite3.node + source ./scripts/ensure-node.sh + echo "Installing Yarn" + npm install yarn --location=global # ensure yarn is installed with the correct node engine + yarn check-node-version + name: Install Node + - run: + command: | + source ./scripts/ensure-node.sh + yarn check-node-version + name: Check Node + install-webkit-deps: + steps: + - run: + command: | + npx playwright install webkit + npx playwright install-deps webkit + name: Install WebKit dependencies + install_cache_helpers_dependencies: + steps: + - run: + command: npm i glob@7.1.6 fs-extra@10.0.0 minimist@1.2.5 + fast-json-stable-stringify@2.1.0 + name: Cache Helper Dependencies + working_directory: ~/ + maybe_skip_binary_jobs: + steps: + - run: + command: | + if [[ -z "$CIRCLE_TOKEN" ]]; then + echo "There is no CIRCLE_TOKEN set for this job. Cannot trigger binary build. Skipping job." + circleci-agent step halt fi - - save_cache: - key: better-sqlite3-{{ checksum "node_modules/better-sqlite3/package.json" }}-{{ - checksum "node_modules/electron/package.json" }} - paths: - - better_sqlite3.node + name: Skip binary job if external PR + post-install-comment: + description: Post GitHub comment with a blurb on how to install pre-release version + parameters: + binary_url_path: + default: binary-url.json + type: string + package_url_path: + default: npm-package-url.json + type: string + steps: - run: - name: Clean up top level better-sqlite3 file command: | - rm ~/cypress/better_sqlite3.node - + node scripts/add-install-comment.js \ + --npm << parameters.package_url_path >> \ + --binary << parameters.binary_url_path >> + name: Post pre-release install comment + prepare-modules-cache: + parameters: + dont-move: + default: false + type: boolean + steps: + - run: node scripts/circle-cache.js --action prepare + - unless: + condition: << parameters.dont-move >> + steps: + - run: + command: | + mkdir -p /tmp/node_modules_cache + mv ~/cypress/node_modules /tmp/node_modules_cache/root_node_modules + mv ~/cypress/cli/node_modules /tmp/node_modules_cache/cli_node_modules + mv ~/cypress/system-tests/node_modules /tmp/node_modules_cache/system-tests_node_modules + mv ~/cypress/globbed_node_modules /tmp/node_modules_cache/globbed_node_modules + name: Move to /tmp dir for consistent caching across root/non-root users + restore_cached_binary: + steps: + - attach_workspace: + at: ~/ + restore_cached_system_tests_deps: + description: Restore the cached node_modules for projects in "system-tests/projects/**" + steps: + - run: + command: ./system-tests/scripts/cache-key.sh > system_tests_cache_key + name: Generate Circle Cache key for system tests + - run: + command: node ./scripts/get-platform-key.js > platform_key + name: Generate platform key + - restore_cache: + keys: + - v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum + "platform_key" }}-system-tests-projects-node-modules-cache-{{ + checksum "system_tests_cache_key" }} + name: Restore system tests node_modules cache + restore_cached_workspace: + steps: + - attach_workspace: + at: ~/ + - install-required-node + - unpack-dependencies + restore_workspace_binaries: + steps: + - attach_workspace: + at: ~/ + - run: ls -l + - run: ls -l cypress.zip cypress.tgz + - run: node --version + - run: npm --version + run-binary-system-tests: + steps: + - restore_cached_workspace + - restore_cached_system_tests_deps + - run: + command: | + ALL_SPECS=`circleci tests glob "$HOME/cypress/system-tests/test-binary/*spec*"` + SPECS=`echo $ALL_SPECS | xargs -n 1 | circleci tests split --split-by=timings` + echo SPECS=$SPECS + yarn workspace @tooling/system-tests test:ci $SPECS + environment: + CYPRESS_COMMERCIAL_RECOMMENDATIONS: "0" + name: Run system tests + - sanitize-verify-and-store-mocha-results run-driver-integration-tests: parameters: browser: description: browser shortname to target type: string - install-chrome-channel: - description: chrome channel to install - type: string - default: 'stable' firefox-version: + default: "142.0" description: firefox version to install type: string - default: *firefox-stable-version inject-document-domain: + default: false description: run subset of tests with injectDocumentDomain config enabled type: boolean - default: false - + install-chrome-channel: + default: stable + description: chrome channel to install + type: string steps: - restore_cached_workspace - when: condition: - equal: [ chrome, << parameters.browser >> ] + equal: + - chrome + - << parameters.browser >> steps: - install-browsers: install-chrome: true - when: condition: - equal: [ chrome:beta, << parameters.browser >> ] + equal: + - chrome:beta + - << parameters.browser >> steps: - install-browsers: - install-chrome: true google-chrome-channel: << parameters.install-chrome-channel >> - google-chrome-version: *chrome-beta-version + google-chrome-version: 140.0.7339.41 + install-chrome: true - when: condition: - equal: [ firefox, << parameters.browser >> ] + equal: + - firefox + - << parameters.browser >> steps: - install-browsers: - install-firefox: true firefox-version: << parameters.firefox-version >> + install-firefox: true - when: condition: - equal: [ webkit, << parameters.browser >> ] + equal: + - webkit + - << parameters.browser >> steps: - install-webkit-deps - run: - name: Run driver tests in Cypress - environment: - CYPRESS_CONFIG_ENV: production command: | echo Current working directory is $PWD echo Total containers $CIRCLE_NODE_TOTAL @@ -736,67 +667,64 @@ commands: fi yarn $YARN_CMD --browser <> --spec $TESTFILES --runner-ui fi + environment: + CYPRESS_CONFIG_ENV: production + name: Run driver tests in Cypress working_directory: packages/driver - sanitize-verify-and-store-mocha-results - - windows-install-chrome: - parameters: - browser: - description: browser shortname to target - type: string - steps: - - run: - # TODO: How can we have preinstalled browsers on CircleCI? - name: 'Install Chrome on Windows' - command: | - # install with `--ignore-checksums` to avoid checksum error - # https://www.gep13.co.uk/blog/chocolatey-error-hashes-do-not-match - [[ $PLATFORM == 'windows' && '<>' == 'chrome' ]] && choco install googlechrome -y --ignore-checksums || [[ $PLATFORM != 'windows' ]] - run-new-ui-tests: parameters: - package: - description: package to target - type: enum - enum: [ 'frontend-shared', 'launchpad', 'app', 'reporter' ] browser: description: browser shortname to target type: string + debug: + default: "" + description: debug option + type: string executor: description: the executor in use. Only used if Windows for workaround purposes type: executor + package: + description: package to target + enum: + - frontend-shared + - launchpad + - app + - reporter + type: enum percy: + default: false description: enable percy type: boolean - default: false type: description: ct or e2e + enum: + - ct + - e2e type: enum - enum: [ 'ct', 'e2e' ] - debug: - description: debug option - type: string - default: '' steps: - restore_cached_workspace - # this is a temporary work around while we wait for circle to resolve issues with packages - # with an @ character in windows during save_cache. - # @see https://github.com/cypress-io/cypress/issues/30343 for more details. - when: condition: - equal: [ *windows-executor, << parameters.executor >> ] + equal: + - environment: + PLATFORM: windows + machine: + image: windows-server-2022-gui:stable + shell: bash.exe -eo pipefail + resource_class: windows.large + - << parameters.executor >> steps: - run: - name: reinstall dependencies to work around cache issue (Windows only) command: rm -rf node_modules && yarn + name: reinstall dependencies to work around cache issue (Windows only) - install-browsers: + executor: << parameters.executor >> install-chrome: true install-firefox: true - executor: << parameters.executor >> - windows-install-chrome: browser: <> - run: - name: Run <> UI tests command: | echo Current working directory is $PWD echo Total containers $CIRCLE_NODE_TOTAL @@ -840,6 +768,7 @@ commands: PERCY_PARALLEL_TOTAL=-1 \ yarn workspace @packages/<> cypress:run:<> --browser <> --spec $TESTFILES fi + name: Run <> UI tests - run: command: | if [[ <> == 'app' && <> == 'true' && -d "packages/app/cypress/screenshots/runner/screenshot/screenshot.cy.tsx/percy" ]]; then @@ -851,7 +780,22 @@ commands: echo "skipping percy screenshots uploading" fi - sanitize-verify-and-store-mocha-results - + run-on-dependencies: + parameters: + command: + description: Command to run on the dependencies. + type: string + package: + description: Package to build all dependencies for. All dependencies in the + dependency chain must have a build script. + type: string + steps: + - run: + command: | + source ./scripts/ensure-node.sh + yarn lerna run <> --scope=<> --include-dependencies + name: Exec << parameters.command >> recursively on << parameters.package >> + dependencies. run-system-tests: parameters: browser: @@ -862,7 +806,9 @@ commands: - restore_cached_system_tests_deps - when: condition: - equal: [ webkit, << parameters.browser >> ] + equal: + - webkit + - << parameters.browser >> steps: - install-webkit-deps - install-browsers: @@ -870,9 +816,6 @@ commands: install-chrome-for-testing: true install-firefox: true - run: - name: Run system tests - environment: - CYPRESS_COMMERCIAL_RECOMMENDATIONS: '0' command: | ALL_SPECS=`circleci tests glob "/root/cypress/system-tests/test/*spec*"` SPECS= @@ -887,271 +830,99 @@ commands: SPECS=`echo $SPECS | xargs -n 1 | circleci tests split --split-by=timings` echo SPECS=$SPECS yarn workspace @tooling/system-tests test:ci $SPECS --browser <> - - sanitize-verify-and-store-mocha-results - - run-binary-system-tests: - steps: - - restore_cached_workspace - - restore_cached_system_tests_deps - - run: - name: Run system tests environment: - CYPRESS_COMMERCIAL_RECOMMENDATIONS: '0' - command: | - ALL_SPECS=`circleci tests glob "$HOME/cypress/system-tests/test-binary/*spec*"` - SPECS=`echo $ALL_SPECS | xargs -n 1 | circleci tests split --split-by=timings` - echo SPECS=$SPECS - yarn workspace @tooling/system-tests test:ci $SPECS + CYPRESS_COMMERCIAL_RECOMMENDATIONS: "0" + name: Run system tests - sanitize-verify-and-store-mocha-results - - post-install-comment: - parameters: - package_url_path: - type: string - default: npm-package-url.json - binary_url_path: - type: string - default: binary-url.json - description: Post GitHub comment with a blurb on how to install pre-release version - steps: - - run: - name: Post pre-release install comment - command: | - node scripts/add-install-comment.js \ - --npm << parameters.package_url_path >> \ - --binary << parameters.binary_url_path >> - sanitize-verify-and-store-mocha-results: description: Double-check that Mocha tests ran as expected. parameters: expectedResultCount: + default: 0 description: The number of result files to expect, ie, the number of Mocha test suites that ran. type: integer - ## pass a default magic number of 0 to assert that at least 1 test ran - default: 0 testResultsPath: + default: /tmp/cypress description: The path to the test results type: string - default: /tmp/cypress steps: - run: - name: 'Sanitize Mocha Results' - when: always command: | source ./scripts/ensure-node.sh yarn sanitize:mocha:results + name: Sanitize Mocha Results + when: always - run: - name: 'Verify Mocha Results' command: | source ./scripts/ensure-node.sh yarn verify:mocha:results <> + name: Verify Mocha Results - store_test_results: path: <> - - clone-repo-and-checkout-branch: - description: | - Clones an external repo and then checks out the branch that matches the next version otherwise uses 'master' branch. - parameters: - repo: - description: "Name of the github repo to clone like: cypress-example-kitchensink" - type: string - pull_request_id: - description: Pull request number to check out before installing and testing - type: integer - default: 0 - steps: - - restore_cached_binary - - run: - name: "Cloning test project and checking out release branch: - <>" - working_directory: /tmp/<> - command: | - git clone --depth 1 --no-single-branch https://github.com/cypress-io/<>.git . - - cd ~/cypress/.. - # install some deps for get-next-version - npm i semver@7.3.2 conventional-recommended-bump@6.1.0 conventional-changelog-angular@5.0.12 minimist@1.2.5 - NEXT_VERSION=$(node ./cypress/scripts/get-next-version.js) - cd - - - git checkout $NEXT_VERSION || true - - when: - condition: <> - steps: - - run: - name: Check out PR <> - working_directory: /tmp/<> - command: | - git fetch origin pull/<>/head:pr-<> - git checkout pr-<> - - test-binary-against-rwa: - description: | - Takes the built binary and NPM package, clones the RWA repo - and runs the new version of Cypress against it. - parameters: - repo: - description: "Name of the github repo to clone like" - type: string - default: "cypress-realworld-app" - browser: - description: Name of the browser to use, like "electron", "chrome", "firefox" - type: enum - enum: [ "", "electron", "chrome", "firefox" ] - default: "" - command: - description: Test command to run to start Cypress tests - type: string - default: "CYPRESS_INTERNAL_ENABLE_TELEMETRY=1 - CYPRESS_RECORD_KEY=$MAIN_RECORD_KEY CYPRESS_PROJECT_ID=ypt4pf yarn - cypress:run" - # if the repo to clone and test is a monorepo, you can - # run tests inside a specific subfolder - folder: - description: Subfolder to test in - type: string - default: "" - # you can test new features in the test runner against recipes or other repos - # by opening a pull request in those repos and running this test job - # against a pull request number in the example repo - pull_request_id: - description: Pull request number to check out before installing and testing - type: integer - default: 0 - server-start-command: - description: Server start command for repo - type: string - default: "CI=true yarn start" + setup_should_persist_artifacts: steps: - - clone-repo-and-checkout-branch: - repo: <> - - when: - condition: <> - steps: - - run: - name: Check out PR <> - working_directory: /tmp/<> - command: | - git fetch origin pull/<>/head:pr-<> - git checkout pr-<> - git log -n 2 - - run: - command: yarn - working_directory: /tmp/<> - run: - name: Install Cypress - working_directory: /tmp/<> - # force installing the freshly built binary command: | - CYPRESS_INSTALL_BINARY=~/cypress/cypress.zip npm i --legacy-peer-deps ~/cypress/cypress.tgz && [[ -f yarn.lock ]] && yarn - - install-browsers: - install-chrome: true - - run: - name: Print Cypress version - working_directory: /tmp/<> - command: npx cypress version - - run: - name: Types check 🧩 (maybe) - working_directory: /tmp/<> - command: yarn types - - run: - # NOTE: we do not need to wait for the vite dev server to start - working_directory: /tmp/<> - command: <> - background: true - - when: - condition: <> - steps: - - when: - condition: <> - steps: - - run: - name: Run tests using browser "<>" - working_directory: /tmp/<>/<> - command: | - <> --browser <> --record false - - unless: - condition: <> - steps: - - run: - name: Run tests using command - working_directory: /tmp/<>/<> - command: <> - - unless: - condition: <> - steps: - - when: - condition: <> - steps: - - run: - name: Run tests using browser "<>" - working_directory: /tmp/<> - command: <> --browser <> --record false - - unless: - condition: <> - steps: - - run: - name: Run tests using command - working_directory: /tmp/<> - command: <> - + echo "Setting SHOULD_PERSIST_ARTIFACTS variable" + echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "chore/refactor_cli_to_ts" ]]; then + export SHOULD_PERSIST_ARTIFACTS=true + fi' >> "$BASH_ENV" + name: Set environment variable to determine whether or not to persist artifacts test-binary-against-repo: description: | Takes the built binary and NPM package, clones given example repo and runs the new version of Cypress against it. parameters: - repo: - description: "Name of the github repo to clone like: cypress-example-kitchensink" - type: string browser: + default: "" description: Name of the browser to use, like "electron", "chrome", "firefox" + enum: + - "" + - electron + - chrome + - firefox type: enum - enum: [ "", "electron", "chrome", "firefox" ] - default: "" - command: - description: Test command to run to start Cypress tests - type: string - default: "npm run e2e" build-project: + default: true description: Should the project build script be executed type: boolean - default: true - # if the repo to clone and test is a monorepo, you can - # run tests inside a specific subfolder + command: + default: npm run e2e + description: Test command to run to start Cypress tests + type: string + executor: + default: cy-doc + description: The executor in use. Only used if Windows for workaround purposes + type: executor folder: + default: "" description: Subfolder to test in type: string - default: "" - # you can test new features in the test runner against recipes or other repos - # by opening a pull request in those repos and running this test job - # against a pull request number in the example repo pull_request_id: + default: 0 description: Pull request number to check out before installing and testing type: integer - default: 0 - wait-on: - description: Whether to use wait-on to wait on a server to be booted + repo: + description: 'Name of the github repo to clone like: cypress-example-kitchensink' type: string - default: "" server-start-command: + default: npm start --if-present description: Server start command for repo type: string - default: "npm start --if-present" - executor: - description: The executor in use. Only used if Windows for workaround purposes - type: executor - default: cy-doc + wait-on: + default: "" + description: Whether to use wait-on to wait on a server to be booted + type: string steps: - run: - name: Install yarn if not already installed command: | yarn --version || npm i -g yarn + name: Install yarn if not already installed - clone-repo-and-checkout-branch: - repo: <> pull_request_id: <> + repo: <> - run: - # Ensure we're installing the node-version for the cloned repo command: | if [[ -f .node-version ]]; then branch="<< pipeline.git.branch >>" @@ -1170,7 +941,6 @@ commands: fi working_directory: /tmp/<> - run: - # Install deps + Cypress binary with yarn if yarn.lock present command: | source ./ci-ensure-node.sh if [[ -f yarn.lock ]]; then @@ -1182,46 +952,48 @@ commands: fi working_directory: /tmp/<> - run: - name: Print Cypress version - working_directory: /tmp/<> command: | source ./ci-ensure-node.sh npx cypress version - - run: - name: Types check 🧩 (maybe) + name: Print Cypress version working_directory: /tmp/<> + - run: command: | source ./ci-ensure-node.sh [[ -f yarn.lock ]] && yarn types || npm run types --if-present + name: "Types check 🧩 (maybe)" + working_directory: /tmp/<> - when: condition: <> steps: - run: - name: Build 🏗 (maybe) - working_directory: /tmp/<> command: | source ./ci-ensure-node.sh [[ -f yarn.lock ]] && yarn build || npm run build --if-present + name: "Build 🏗 (maybe)" + working_directory: /tmp/<> - run: - working_directory: /tmp/<> + background: true command: | source ./ci-ensure-node.sh <> - background: true + working_directory: /tmp/<> - when: condition: not: - equal: [ "", <> ] + equal: + - "" + - <> steps: - run: - name: "Waiting on server to boot: <>" command: | npm i -g wait-on npx wait-on <> --timeout 120000 + name: 'Waiting on server to boot: <>' - install-browsers: + executor: << parameters.executor >> install-chrome: true install-firefox: true - executor: << parameters.executor >> - windows-install-chrome: browser: <> - when: @@ -1231,17 +1003,17 @@ commands: condition: <> steps: - run: - name: Run tests using browser "<>" - working_directory: /tmp/<>/<> command: | <> -- --browser <> + name: Run tests using browser "<>" + working_directory: /tmp/<>/<> - unless: condition: <> steps: - run: + command: <> name: Run tests using command working_directory: /tmp/<>/<> - command: <> - unless: condition: <> steps: @@ -1249,507 +1021,588 @@ commands: condition: <> steps: - run: - name: Run tests using browser "<>" - working_directory: /tmp/<> command: | source ./ci-ensure-node.sh <> -- --browser <> + name: Run tests using browser "<>" + working_directory: /tmp/<> - unless: condition: <> steps: - run: - name: Run tests using command - working_directory: /tmp/<> command: | source ./ci-ensure-node.sh <> - - check-if-binary-exists: - steps: - - run-on-dependencies: - package: internal-scripts - command: build - - run: - name: Check if binary exists, exit if it does - command: | - source ./scripts/ensure-node.sh - yarn gulp e2eTestScaffold - yarn check-binary-on-cdn --version $(node ./scripts/get-next-version.js) --type binary --file cypress.zip - - run-on-dependencies: + name: Run tests using command + working_directory: /tmp/<> + test-binary-against-rwa: + description: | + Takes the built binary and NPM package, clones the RWA repo + and runs the new version of Cypress against it. parameters: - package: - description: Package to build all dependencies for. All dependencies in the - dependency chain must have a build script. - type: string + browser: + default: "" + description: Name of the browser to use, like "electron", "chrome", "firefox" + enum: + - "" + - electron + - chrome + - firefox + type: enum command: - description: Command to run on the dependencies. + default: CYPRESS_INTERNAL_ENABLE_TELEMETRY=1 CYPRESS_RECORD_KEY=$MAIN_RECORD_KEY + CYPRESS_PROJECT_ID=ypt4pf yarn cypress:run + description: Test command to run to start Cypress tests + type: string + folder: + default: "" + description: Subfolder to test in + type: string + pull_request_id: + default: 0 + description: Pull request number to check out before installing and testing + type: integer + repo: + default: cypress-realworld-app + description: Name of the github repo to clone like + type: string + server-start-command: + default: CI=true yarn start + description: Server start command for repo type: string steps: + - clone-repo-and-checkout-branch: + repo: <> + - when: + condition: <> + steps: + - run: + command: | + git fetch origin pull/<>/head:pr-<> + git checkout pr-<> + git log -n 2 + name: Check out PR <> + working_directory: /tmp/<> + - run: + command: yarn + working_directory: /tmp/<> - run: - name: Exec << parameters.command >> recursively on << parameters.package >> - dependencies. command: | - source ./scripts/ensure-node.sh - yarn lerna run <> --scope=<> --include-dependencies - - build-and-package-binary: - steps: - - run: - name: Check environment variables before code sign (if on Mac/Windows) - # NOTE - # our code sign works via electron-builder - # by default, electron-builder will NOT sign app built in a pull request - # even our internal one (!) - # Usually this is not a problem, since we only build and test binary - # built on the "develop" branch - # but if you need to really build and sign a binary in a PR - # set variable CSC_FOR_PULL_REQUEST=true - command: | - set -e - NEEDS_CODE_SIGNING_WINDOWS=`node -p 'process.platform === "win32"'` - NEEDS_CODE_SIGNING_MAC=`node -p 'process.platform === "darwin"'` - - if [[ "$NEEDS_CODE_SIGNING_MAC" == "true" ]]; then - echo "Checking for required environment variables..." - if [ -z "$CSC_LINK" ]; then - echo "Need to provide environment variable CSC_LINK" - echo "with base64 encoded certificate .p12 file" - exit 1 - fi - if [ -z "$CSC_KEY_PASSWORD" ]; then - echo "Need to provide environment variable CSC_KEY_PASSWORD" - echo "with password for unlocking certificate .p12 file" - exit 1 - fi - echo "Succeeded." - elif [[ "$NEEDS_CODE_SIGNING_WINDOWS" == "true" ]]; then - echo "Checking for required environment variables..." - if [ -z "$WINDOWS_SIGN_USER_NAME" ]; then - echo "Need to provide environment variable WINDOWS_SIGN_USER_NAME" - echo "with password for fetching and signing certificate" - exit 1 - fi - if [ -z "$WINDOWS_SIGN_USER_PASSWORD" ]; then - echo "Need to provide environment variable WINDOWS_SIGN_USER_PASSWORD" - echo "for fetching and signing certificate" - exit 1 - fi - if [ -z "$WINDOWS_SIGN_CREDENTIAL_ID" ]; then - echo "Need to provide environment variable WINDOWS_SIGN_CREDENTIAL_ID" - echo "for identifying certificate" - exit 1 - fi - if [ -z "$WINDOWS_SIGN_USER_TOTP" ]; then - echo "Need to provide environment variable WINDOWS_SIGN_USER_TOTP" - echo "for signing certificate" - exit 1 - fi - echo "Succeeded." - else - echo "Not code signing for this platform" - fi - - 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) - else - yarn binary-build --version $(node ./scripts/get-next-version.js) - fi + CYPRESS_INSTALL_BINARY=~/cypress/cypress.zip npm i --legacy-peer-deps ~/cypress/cypress.tgz && [[ -f yarn.lock ]] && yarn + name: Install Cypress + working_directory: /tmp/<> + - install-browsers: + install-chrome: true - run: - name: Package the Cypress binary - environment: - DEBUG: electron-builder,electron-osx-sign*,electron-notarize* - # notarization on Mac can take a while - 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-package --version $(node ./scripts/get-next-version.js) - else - yarn binary-package --version $(node ./scripts/get-next-version.js) - fi + command: npx cypress version + name: Print Cypress version + working_directory: /tmp/<> - run: - name: Smoke Test the Cypress binary - command: | - source ./scripts/ensure-node.sh - node --version - yarn binary-smoke-test --version $(node ./scripts/get-next-version.js) + command: yarn types + name: "Types check 🧩 (maybe)" + working_directory: /tmp/<> - run: - name: Zip the binary - command: | - if [[ $PLATFORM == 'linux' ]]; then - # on Arm, CI runs as non-root, on x64 CI runs as root but there is no sudo binary - if [[ `whoami` == 'root' ]]; then - apt-get update && apt-get install -y zip - else - sudo apt-get update && sudo apt-get install -y zip - fi - fi - source ./scripts/ensure-node.sh - yarn binary-zip - - persist_to_workspace: - root: ~/ - paths: - - cypress/cypress.zip - + background: true + command: <> + working_directory: /tmp/<> + - when: + condition: <> + steps: + - when: + condition: <> + steps: + - run: + command: | + <> --browser <> --record false + name: Run tests using browser "<>" + working_directory: /tmp/<>/<> + - unless: + condition: <> + steps: + - run: + command: <> + name: Run tests using command + working_directory: /tmp/<>/<> + - unless: + condition: <> + steps: + - when: + condition: <> + steps: + - run: + command: <> --browser <> --record false + name: Run tests using browser "<>" + working_directory: /tmp/<> + - unless: + condition: <> + steps: + - run: + command: <> + name: Run tests using command + working_directory: /tmp/<> trigger-publish-binary-pipeline: steps: - run: - name: "Trigger publish-binary pipeline" command: | source ./scripts/ensure-node.sh echo $SHOULD_PERSIST_ARTIFACTS node ./scripts/binary/trigger-publish-binary-pipeline.js + name: Trigger publish-binary pipeline - persist_to_workspace: - root: ~/ paths: - triggered_pipeline.json - - build-cypress-npm-package: - parameters: - executor: - type: executor - default: cy-doc + root: ~/ + unpack-dependencies: + description: Unpacks dependencies associated with the current workflow steps: + - install_cache_helpers_dependencies - run: - name: Bump NPM version - command: | - source ./scripts/ensure-node.sh - yarn get-next-version --npm + command: node scripts/circle-cache.js --action cacheKey > circle_cache_key + name: Generate Circle Cache Key + - run: + command: node ./scripts/get-platform-key.js > platform_key + name: Generate platform key + - restore_cache: + key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" + }}-node-modules-cache-{{ checksum "circle_cache_key" }} + name: Restore cache state, to check for known modules cache existence - run: - name: Build NPM package command: | - source ./scripts/ensure-node.sh - yarn lerna run build-cli + if [[ -d "/tmp/node_modules_cache" ]]; then + mv /tmp/node_modules_cache/root_node_modules ~/cypress/node_modules + mv /tmp/node_modules_cache/cli_node_modules ~/cypress/cli/node_modules + mv /tmp/node_modules_cache/system-tests_node_modules ~/cypress/system-tests/node_modules + mv /tmp/node_modules_cache/globbed_node_modules ~/cypress/globbed_node_modules + rm -rf /tmp/node_modules_cache + fi + name: Move node_modules back from /tmp - run: - command: ls -la types - working_directory: cli/build + command: node scripts/circle-cache.js --action unpack + name: Restore all node_modules to proper workspace folders + update_cached_system_tests_deps: + description: Update the cached node_modules for projects in "system-tests/projects/**" + steps: - run: - command: ls -la vue mount-utils react - working_directory: cli/build - - unless: - condition: - equal: [ *windows-executor, << parameters.executor >> ] - steps: - - run: - name: list NPM package contents - command: | - source ./scripts/ensure-node.sh - yarn workspace cypress size + command: ./system-tests/scripts/cache-key.sh > system_tests_cache_key + name: Generate Circle Cache key for system tests - run: - name: pack NPM package - working_directory: cli/build - command: yarn pack --filename ../../cypress.tgz + command: node ./scripts/get-platform-key.js > platform_key + name: Generate platform key + - restore_cache: + keys: + - v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum + "platform_key" + }}-state-of-system-tests-projects-node-modules-cache-{{ checksum + "system_tests_cache_key" }} + name: Restore cache state, to check for known modules cache existence - run: - name: list created NPM package - command: ls -l - - persist_to_workspace: - root: ~/ + command: | + if [[ -f "/tmp/system_tests_node_modules_installed" ]]; then + echo "No updates to system tests node modules, exiting" + circleci-agent step halt + fi + name: Bail if specific cache exists + - restore_cache: + keys: + - v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum + "platform_key" }}-system-tests-projects-node-modules-cache-{{ + checksum "system_tests_cache_key" }} + - v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum + "platform_key" }}-system-tests-projects-node-modules-cache- + name: Restore system tests node_modules cache + - run: + command: yarn workspace @tooling/system-tests projects:yarn:install + name: Update system-tests node_modules cache + - save_cache: + key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" + }}-system-tests-projects-node-modules-cache-{{ checksum + "system_tests_cache_key" }} + name: Save system tests node_modules cache paths: - - cypress/cypress.tgz - - upload-build-artifacts: + - /tmp/cy-system-tests-node-modules + - run: touch /tmp/system_tests_node_modules_installed + - save_cache: + key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" + }}-state-of-system-tests-projects-node-modules-cache-{{ checksum + "system_tests_cache_key" }} + name: Save system tests node_modules cache state key + paths: + - /tmp/system_tests_node_modules_installed + update_known_hosts: + description: Ensures that we have the latest Git public keys to prevent git+ssh + from failing. steps: - - run: ls -l - run: - name: Upload unique binary to S3 command: | - node scripts/binary.js upload-build-artifact \ - --type binary \ + mkdir -p ~/.ssh + ssh-keyscan github.com >> ~/.ssh/known_hosts + name: Update known_hosts with github.com keys + upload-build-artifacts: + steps: + - run: ls -l + - run: + command: | + node scripts/binary.js upload-build-artifact \ + --type binary \ --file cypress.zip \ --version $(node -p "require('./package.json').version") + name: Upload unique binary to S3 - run: - name: Upload NPM package to S3 command: | node scripts/binary.js upload-build-artifact \ --type npm-package \ --file cypress.tgz \ --version $(node -p "require('./package.json').version") + name: Upload NPM package to S3 - run: ls -l - run: cat binary-url.json - run: cat npm-package-url.json - persist_to_workspace: - root: ~/ paths: - cypress/binary-url.json - cypress/npm-package-url.json - - update_known_hosts: - description: Ensures that we have the latest Git public keys to prevent git+ssh - from failing. + root: ~/ + verify-build-setup: + description: Common commands run when setting up for build or yarn install + parameters: + executor: + default: cy-doc + type: executor steps: + - run: pwd + - run: + command: yarn versions + name: print yarn version + - unless: + condition: + equal: + - environment: + PLATFORM: windows + machine: + image: windows-server-2022-gui:stable + shell: bash.exe -eo pipefail + resource_class: windows.large + - << parameters.executor >> + steps: + - run: + command: | + source ./scripts/ensure-node.sh + yarn stop-only-all + name: Stop .only - run: - name: Update known_hosts with github.com keys command: | - mkdir -p ~/.ssh - ssh-keyscan github.com >> ~/.ssh/known_hosts - -jobs: - ## Checks if we already have a valid cache for the node_modules_install and if it has, - ## skips ahead to the build step, otherwise installs and caches the node_modules - node_modules_install: - <<: *defaults + source ./scripts/ensure-node.sh + yarn check-terminal + name: Check terminal variables + verify_should_persist_artifacts: + steps: + - run: + command: | + if [[ -z "$SHOULD_PERSIST_ARTIFACTS" ]]; then + echo "Not uploading artifacts or posting install comment for this branch." + circleci-agent step halt + fi + name: Check current branch to persist artifacts + windows-install-chrome: parameters: - <<: *defaultsParameters - resource_class: + browser: + description: browser shortname to target type: string - default: medium - build-better-sqlite3: - type: boolean - default: false - resource_class: << parameters.resource_class >> steps: - - update_known_hosts - - checkout - - install-required-node - - verify-build-setup: - executor: << parameters.executor >> - - persist_to_workspace: - root: ~/ - paths: - - cypress - - .ssh - - .nvm # mac / linux - - ProgramData/nvm # windows - - caching-dependency-installer: - only-cache-for-root-user: <> - build-better-sqlite3: <> - - ## restores node_modules from previous step & builds if first step skipped + - run: + command: | + # install with `--ignore-checksums` to avoid checksum error + # https://www.gep13.co.uk/blog/chocolatey-error-hashes-do-not-match + [[ $PLATFORM == 'windows' && '<>' == 'chrome' ]] && choco install googlechrome -y --ignore-checksums || [[ $PLATFORM != 'windows' ]] + name: Install Chrome on Windows +defaults: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + working_directory: ~/cypress +executors: + cy-doc: + docker: + - image: cypress/base-internal:22.15.1-bullseye + environment: + PLATFORM: linux + resource_class: medium + darwin-amd64: + environment: + PLATFORM: darwin + machine: true + darwin-arm64: + environment: + PLATFORM: darwin + machine: true + kitchensink-executor: + docker: + - image: cypress/base-internal:22.15.1-bullseye + environment: + PLATFORM: linux + resource_class: medium + linux-arm64: + environment: + DISABLE_SNAPSHOT_REQUIRE: 1 + PLATFORM: linux + machine: + image: ubuntu-2004:2024.11.1 + resource_class: arm.medium + non-root-docker-user: + docker: + - image: cypress/base-internal:22.15.1-bullseye + user: node + environment: + PLATFORM: linux + windows: + environment: + PLATFORM: windows + machine: + image: windows-server-2022-gui:stable + shell: bash.exe -eo pipefail + resource_class: windows.large +firefox-stable-version: "142.0" +jobs: + binary-system-tests: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + PLATFORM: linux + TZ: /usr/share/zoneinfo/America/New_York + machine: + docker_layer_caching: true + image: ubuntu-2004:2024.05.1 + parallelism: 2 + resource_class: medium + steps: + - maybe_skip_binary_jobs + - run-binary-system-tests + working_directory: ~/cypress build: - <<: *defaults + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 parameters: - <<: *defaultsParameters - resource_class: - type: string - default: large + executor: + default: cy-doc + type: executor is_contributor_pr: + default: false type: boolean + only-cache-for-root-user: default: false + type: boolean + resource_class: + default: large + type: string resource_class: << parameters.resource_class >> steps: - restore_cached_workspace - # this is a temporary work around while we wait for circle to resolve issues with packages - # with an @ character in windows during save_cache. - # @see https://github.com/cypress-io/cypress/issues/30343 for more details. - when: condition: - equal: [ *windows-executor, << parameters.executor >> ] + equal: + - environment: + PLATFORM: windows + machine: + image: windows-server-2022-gui:stable + shell: bash.exe -eo pipefail + resource_class: windows.large + - << parameters.executor >> steps: - run: - name: reinstall dependencies to work around cache issue (Windows only) command: rm -rf node_modules && yarn + name: reinstall dependencies to work around cache issue (Windows only) - run: - name: Top level packages command: yarn list --depth=0 || true + name: Top level packages - run: - name: Check env canaries command: node ./scripts/circle-env.js --check-canaries --is-contributor-pr << parameters.is_contributor_pr >> + name: Check env canaries - build-and-persist - - lint: - <<: *defaults - steps: - - restore_cached_workspace - - run: - name: Linting 🧹 - command: | - yarn clean - git clean -df - yarn lint - - run: - name: cypress info (dev) - command: node cli/bin/cypress info --dev - + working_directory: ~/cypress check-ts: - <<: *defaults + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean steps: - restore_cached_workspace - install-required-node - run: - name: Check TS Types command: NODE_OPTIONS=--max_old_space_size=4096 yarn check-ts --concurrency=1 - - # a special job that closes the Percy build started by the required jobs - percy-finalize: - <<: *defaults - resource_class: small + name: Check TS Types + working_directory: ~/cypress + cli-visual-tests: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 parameters: - <<: *defaultsParameters - required_env_var: - type: env_var_name + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: small steps: - restore_cached_workspace + - run: mkdir -p cli/visual-snapshots - run: - # if this is an external pull request, the environment variables - # are NOT set for security reasons, thus no need to to finalize Percy, - # since there will be no visual tests - name: Check if <> is set - command: | - if [[ -v <> ]]; then - echo "Internal PR, good to go" - else - echo "This is an external PR, cannot access other services" - circleci-agent step halt - fi + command: node cli/bin/cypress info --dev | yarn --silent term-to-html | node + scripts/sanitize --type cli-info > + cli/visual-snapshots/cypress-info.html + environment: + FORCE_COLOR: 2 + - run: + command: node cli/bin/cypress help | yarn --silent term-to-html > + cli/visual-snapshots/cypress-help.html + environment: + FORCE_COLOR: 2 - run: - # Sometimes, even though all the circle jobs have finished, Percy times out during `build:finalize` - # If all other jobs finish but `build:finalize` fails, we retry it once - name: Finalize percy build - allows single retry command: | PERCY_PARALLEL_NONCE=$CIRCLE_WORKFLOW_WORKSPACE_ID \ - yarn percy build:finalize || yarn percy build:finalize - - # verify accessibility scores from Cypress - verify-accessibility-results: - <<: *defaults - resource_class: small - steps: - - run: | - if [[ -z "$MAIN_RECORD_KEY" ]]; then - echo "skipping for contributor PRs since we don't record to the cloud" - circleci-agent step halt - fi - - update_known_hosts - - run: - name: checkout - command: git clone -b "$CIRCLE_BRANCH" "$CIRCLE_REPOSITORY_URL" --depth 1 - - run: - name: Install extract-cloud-results package - command: | - npm install https://cdn.cypress.io/extract-cloud-results/v1/extract-cloud-results.tgz - - run: - name: Verify Accessibility Results - command: | - cp ./cypress/scripts/verify-accessibility-results.js verify-accessibility-results.js - CYPRESS_RECORD_KEY=$MAIN_RECORD_KEY node verify-accessibility-results.js - - ready-to-release: - <<: *defaults - resource_class: small - parameters: - <<: *defaultsParameters - steps: - - run: - name: Ready to release - command: echo 'Ready to release' - - cli-visual-tests: - <<: *defaults - resource_class: small + PERCY_ENABLE=${PERCY_TOKEN:-0} \ + PERCY_PARALLEL_TOTAL=-1 \ + yarn percy snapshot ./cli/visual-snapshots + name: Upload CLI snapshots for diffing + working_directory: ~/cypress + create-and-trigger-packaging-artifacts: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: + default: small + type: string + resource_class: << parameters.resource_class >> steps: + - maybe_skip_binary_jobs - restore_cached_workspace - - run: mkdir -p cli/visual-snapshots - - run: - command: node cli/bin/cypress info --dev | yarn --silent term-to-html | node - scripts/sanitize --type cli-info > - cli/visual-snapshots/cypress-info.html - environment: - FORCE_COLOR: 2 - - run: - command: node cli/bin/cypress help | yarn --silent term-to-html > - cli/visual-snapshots/cypress-help.html - environment: - FORCE_COLOR: 2 - - run: - name: Upload CLI snapshots for diffing - command: | - PERCY_PARALLEL_NONCE=$CIRCLE_WORKFLOW_WORKSPACE_ID \ - PERCY_ENABLE=${PERCY_TOKEN:-0} \ - PERCY_PARALLEL_TOTAL=-1 \ - yarn percy snapshot ./cli/visual-snapshots - - v8-integration-tests: - <<: *defaults + - check-if-binary-exists + - setup_should_persist_artifacts + - trigger-publish-binary-pipeline + working_directory: ~/cypress + create-build-artifacts: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 parameters: - <<: *defaultsParameters + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean resource_class: + default: xlarge type: string - default: medium resource_class: << parameters.resource_class >> - parallelism: 1 steps: - restore_cached_workspace - - restore_cached_system_tests_deps - # this is a temporary work around while we wait for circle to resolve issues with packages - # with an @ character in windows during save_cache. - # @see https://github.com/cypress-io/cypress/issues/30343 for more details. - when: condition: - equal: [ *windows-executor, << parameters.executor >> ] + equal: + - environment: + PLATFORM: windows + machine: + image: windows-server-2022-gui:stable + shell: bash.exe -eo pipefail + resource_class: windows.large + - << parameters.executor >> steps: - run: - name: reinstall dependencies to work around cache issue (Windows only) command: rm -rf node_modules && yarn - # TODO: Remove this once we switch off self-hosted M1 runners - - when: - condition: - equal: [ *darwin-arm64-executor, << parameters.executor >> ] - steps: - - run: rm -f /tmp/cypress/junit/* - - unless: - condition: - or: - - equal: [ *linux-arm64-executor, << parameters.executor >> ] # TODO: Figure out how to support linux-arm64 when we get to linux arm64 build: https://github.com/cypress-io/cypress/issues/23557 - steps: - - run: - name: Run v8 integration tests - command: | - source ./scripts/ensure-node.sh - yarn test-integration --scope=@tooling/{packherd,v8-snapshot,electron-mksnapshot} - - sanitize-verify-and-store-mocha-results: - expectedResultCount: 3 - - when: - condition: - or: - - equal: [ *linux-arm64-executor, << parameters.executor >> ] - steps: - - run: - name: Run v8 integration tests - command: | - source ./scripts/ensure-node.sh - yarn test-integration --scope=@tooling/packherd - - sanitize-verify-and-store-mocha-results: - expectedResultCount: 1 - + name: reinstall dependencies to work around cache issue (Windows only) + - check-if-binary-exists + - build-and-package-binary + - build-cypress-npm-package: + executor: << parameters.executor >> + - setup_should_persist_artifacts + - verify_should_persist_artifacts + - upload-build-artifacts + - post-install-comment + working_directory: ~/cypress driver-integration-memory-tests: - <<: *defaults + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 parameters: - <<: *defaultsParameters + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean resource_class: - type: string default: medium + type: string resource_class: << parameters.resource_class >> - parallelism: 1 steps: - restore_cached_workspace - # this is a temporary work around while we wait for circle to resolve issues with packages - # with an @ character in windows during save_cache. - # @see https://github.com/cypress-io/cypress/issues/30343 for more details. - when: condition: - equal: [ *windows-executor, << parameters.executor >> ] + equal: + - environment: + PLATFORM: windows + machine: + image: windows-server-2022-gui:stable + shell: bash.exe -eo pipefail + resource_class: windows.large + - << parameters.executor >> steps: - run: - name: reinstall dependencies to work around cache issue (Windows only) command: rm -rf node_modules && yarn + name: reinstall dependencies to work around cache issue (Windows only) - run: - name: Driver memory tests in Electron - environment: - CYPRESS_CONFIG_ENV: production command: | echo Current working directory is $PWD node --version @@ -1762,748 +1615,1575 @@ jobs: CYPRESS_INTERNAL_MEMORY_SAVE_STATS=true \ DEBUG=cypress*memory \ yarn cypress:run --browser electron --spec "cypress/e2e/memory/*.cy.*" + environment: + CYPRESS_CONFIG_ENV: production + name: Driver memory tests in Electron working_directory: packages/driver - sanitize-verify-and-store-mocha-results - - unit-tests: - <<: *defaults + working_directory: ~/cypress + driver-integration-tests-chrome: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 5 parameters: - <<: *defaultsParameters - resource_class: - type: string - default: medium - resource_class: << parameters.resource_class >> - parallelism: 1 + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: medium+ steps: - - restore_cached_workspace - - install-browsers: - install-chrome: true - executor: << parameters.executor >> - - when: - condition: - # several snapshots fails for windows due to paths. - # until these are fixed, run the tests that are working. - equal: [ *windows-executor, << parameters.executor >> ] - steps: - - run: yarn test-scripts scripts/**/*spec.js - - sanitize-verify-and-store-mocha-results - - unless: - condition: - equal: [ *windows-executor, << parameters.executor >> ] - steps: - - run: yarn test-scripts - # run unit tests from each individual package - - run: yarn test - # run type checking for each individual package - - run: yarn lerna run types - - sanitize-verify-and-store-mocha-results: - expectedResultCount: 20 - - verify-release-readiness: - <<: *defaults - resource_class: small - parallelism: 1 + - run-driver-integration-tests: + browser: chrome + install-chrome-channel: stable + working_directory: ~/cypress + driver-integration-tests-chrome-beta: environment: - GITHUB_TOKEN: $GH_TOKEN + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 5 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: medium+ steps: - - restore_cached_workspace - - update_known_hosts - - run: yarn test-npm-package-release-script - - run: node ./scripts/semantic-commits/validate-binary-changelog.js - - store_artifacts: - path: /tmp/releaseData - - lint-types: - <<: *defaults - parallelism: 1 + - run-driver-integration-tests: + browser: chrome:beta + install-chrome-channel: beta + working_directory: ~/cypress + driver-integration-tests-chrome-beta-inject-document-domain: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 5 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: medium+ steps: - - restore_cached_workspace - - run: - command: ls -la types - working_directory: cli - - run: - command: ls -la chai - working_directory: cli/types - - run: - name: "Lint types 🧹" - command: yarn workspace cypress dtslint - - server-unit-tests: - <<: *defaults - parallelism: 1 + - run-driver-integration-tests: + browser: chrome:beta + inject-document-domain: true + install-chrome-channel: beta + working_directory: ~/cypress + driver-integration-tests-chrome-inject-document-domain: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 5 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: medium+ steps: - - restore_cached_workspace - - run: yarn test-unit --scope=@packages/server - - sanitize-verify-and-store-mocha-results: - expectedResultCount: 1 - - server-unit-tests-cloud-environment: - <<: *defaults + - run-driver-integration-tests: + browser: chrome + inject-document-domain: true + install-chrome-channel: stable + working_directory: ~/cypress + driver-integration-tests-electron: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 5 parameters: - <<: *defaultsParameters - resource_class: - type: string - default: medium - resource_class: << parameters.resource_class >> - parallelism: 1 + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean steps: - - restore_cached_workspace - # TODO: Remove this once we switch off self-hosted M1 runners - - when: - condition: - equal: [ *darwin-arm64-executor, << parameters.executor >> ] - steps: - - run: rm -f /tmp/cypress/junit/* - # this is a temporary work around while we wait for circle to resolve issues with packages - # with an @ character in windows during save_cache. - # @see https://github.com/cypress-io/cypress/issues/30343 for more details. - - when: - condition: - equal: [ *windows-executor, << parameters.executor >> ] - steps: - - run: - name: reinstall dependencies to work around cache issue (Windows only) - command: rm -rf node_modules && yarn - - run: yarn workspace @packages/server test-unit cloud/environment_spec.ts - - sanitize-verify-and-store-mocha-results: - expectedResultCount: 1 - - server-integration-tests: - <<: *defaults - parallelism: 1 - steps: - - restore_cached_workspace - - install-browsers: - install-chrome: true - - run: yarn test-integration --scope=@packages/server - - sanitize-verify-and-store-mocha-results: - expectedResultCount: 1 - - server-performance-tests: - <<: *defaults - steps: - - restore_cached_workspace - - install-browsers: - install-chrome: true - install-firefox: true - - run: - command: yarn workspace @packages/server test-performance - - sanitize-verify-and-store-mocha-results: - expectedResultCount: 1 - - system-tests-node-modules-install: - <<: *defaults + - run-driver-integration-tests: + browser: electron + working_directory: ~/cypress + driver-integration-tests-firefox: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 5 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: medium+ steps: - - restore_cached_workspace - - update_cached_system_tests_deps - - binary-system-tests: - parallelism: 2 + - run-driver-integration-tests: + browser: firefox working_directory: ~/cypress + driver-integration-tests-webkit: environment: - <<: *defaultsEnvironment - PLATFORM: linux - machine: - # using `machine` gives us a Linux VM that can run Docker - image: ubuntu-2004:2024.05.1 - docker_layer_caching: true - resource_class: medium + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 5 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: large steps: - - maybe_skip_binary_jobs - - run-binary-system-tests - yarn-pnp-preprocessor-system-test: - parallelism: 1 + - run-driver-integration-tests: + browser: webkit + inject-document-domain: true working_directory: ~/cypress - docker: - # we need an image with yarn 4 berry installed on it to run this test - - image: cypress/base-internal:22.15.1-yarn-berry + get-published-artifacts: environment: - # needed to inform the bootstrap-docker-container.sh script to link the binary in the system-test project directory - REPO_DIR: /root/cypress - TEST_PROJECT_DIR: ./system-tests/projects/yarn-v4.3.1-pnp-dep-resolution - USE_YARN_TO_INSTALL_CYPRESS_BINARY: true + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: + default: medium + type: string + resource_class: << parameters.resource_class >> steps: - maybe_skip_binary_jobs - - attach_workspace: - at: ~/ - # required node is set in the docker container already with yarn 4 - - run: - name: Install monorepo dependencies with yarn v1.22.22 - command: | - # we need to install the monorepo dependencies here in a fresh manner. - # set to the expected version of yarn and install the dependencies - yarn set version 1.22.22 - yarn install --ignore-scripts + - restore_cached_workspace - run: - name: install dependencies in yarn-v4.3.1-pnp-dep-resolution with yarn berry - 4.3.1 - command: | - yarn set version 4.3.1 - cd ./system-tests/projects/yarn-v4.3.1-pnp-dep-resolution && yarn + command: cat ~/triggered_pipeline.json + name: Check pipeline info + - setup_should_persist_artifacts - run: - name: Bootstrap the Cypress binary and run binary system test command: | - # we need to bootstrap the binary into our project directory and run the tests - source ./system-tests/scripts/bootstrap-docker-container.sh 'yarn cypress run' - # We can remove this job a once https://github.com/sveltejs/svelte-loader/issues/243 is resolved. - svelte-webpack-system-test: - parallelism: 1 + source ./scripts/ensure-node.sh + node ./scripts/binary/get-published-artifacts.js --pipelineInfo ~/triggered_pipeline.json --platformKey $(node ./scripts/get-platform-key.js) + name: Download binary artifacts + - persist_to_workspace: + paths: + - cypress/cypress.zip + - cypress/cypress.tgz + root: ~/ + - verify_should_persist_artifacts + - persist_to_workspace: + paths: + - cypress/binary-url.json + - cypress/npm-package-url.json + root: ~/ + - post-install-comment: + binary_url_path: ~/cypress/binary-url.json + package_url_path: ~/cypress/npm-package-url.json working_directory: ~/cypress - docker: - - image: cypress/base-internal:22.15.1-bullseye + lint: environment: - # needed to inform the bootstrap-docker-container.sh script to link the binary in the system-test project directory - REPO_DIR: /root/cypress - TEST_PROJECT_DIR: ./system-tests/projects/svelte-webpack-configured - USE_YARN_TO_INSTALL_CYPRESS_BINARY: true + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean steps: - - maybe_skip_binary_jobs - - attach_workspace: - at: ~/ - - run: - name: Install monorepo dependencies - command: yarn install --ignore-scripts - - run: - name: install dependencies - command: cd ./system-tests/projects/svelte-webpack-configured && yarn + - restore_cached_workspace - run: - name: Bootstrap the Cypress binary and run binary system test command: | - # we need to bootstrap the binary into our project directory and run the tests - source ./system-tests/scripts/bootstrap-docker-container.sh 'yarn cypress run --component --spec src/mount.cy.ts src/App.cy.ts' - - 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: - browser: webkit - - system-tests-non-root: - <<: *defaults - steps: - - restore_cached_workspace + yarn clean + git clean -df + yarn lint + name: "Linting 🧹" - run: - environment: - CYPRESS_COMMERCIAL_RECOMMENDATIONS: '0' - command: yarn workspace @tooling/system-tests test:ci "test/non_root*spec*" - --browser electron - - sanitize-verify-and-store-mocha-results - - run-frontend-shared-component-tests-chrome: - <<: *defaults + command: node cli/bin/cypress info --dev + name: cypress info (dev) + working_directory: ~/cypress + lint-types: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 parameters: - <<: *defaultsParameters - percy: - type: boolean + executor: + default: cy-doc + type: executor + only-cache-for-root-user: default: false - parallelism: 3 + type: boolean steps: - - run-new-ui-tests: - browser: chrome - executor: << parameters.executor >> - percy: << parameters.percy >> - package: frontend-shared - type: ct - - run-launchpad-component-tests-chrome: - <<: *defaults + - restore_cached_workspace + - run: + command: ls -la types + working_directory: cli + - run: + command: ls -la chai + working_directory: cli/types + - run: + command: yarn workspace cypress dtslint + name: "Lint types 🧹" + working_directory: ~/cypress + node_modules_install: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 parameters: - <<: *defaultsParameters - percy: + build-better-sqlite3: + default: false type: boolean + executor: + default: cy-doc + type: executor + only-cache-for-root-user: default: false - parallelism: 7 + type: boolean + resource_class: + default: medium + type: string + resource_class: << parameters.resource_class >> steps: - - run-new-ui-tests: - browser: chrome + - update_known_hosts + - checkout + - install-required-node + - verify-build-setup: executor: << parameters.executor >> - percy: << parameters.percy >> - package: launchpad - type: ct - # debug: cypress:*,engine:socket - - run-launchpad-integration-tests-chrome: - <<: *defaults + - persist_to_workspace: + paths: + - cypress + - .ssh + - .nvm + - ProgramData/nvm + root: ~/ + - caching-dependency-installer: + build-better-sqlite3: <> + only-cache-for-root-user: <> + working_directory: ~/cypress + npm-angular: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 parameters: - <<: *defaultsParameters - resource_class: - type: string - default: large - percy: - type: boolean + executor: + default: cy-doc + type: executor + only-cache-for-root-user: default: false - resource_class: << parameters.resource_class >> - parallelism: 3 + type: boolean steps: - - run-new-ui-tests: - browser: chrome - executor: << parameters.executor >> - percy: << parameters.percy >> - package: launchpad - type: e2e - - run-app-component-tests-chrome: - <<: *defaults + - restore_cached_workspace + - run: + command: yarn lerna run build --scope=@cypress/angular + name: Build + working_directory: ~/cypress + npm-cypress-schematic: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 parameters: - <<: *defaultsParameters - resource_class: - type: string - default: medium+ - percy: - type: boolean + executor: + default: cy-doc + type: executor + only-cache-for-root-user: default: false - parallelism: 7 + type: boolean steps: - - run-new-ui-tests: - browser: chrome - executor: << parameters.executor >> - percy: << parameters.percy >> - package: app - type: ct - - run-app-integration-tests-chrome: - <<: *defaults + - restore_cached_workspace + - run: + command: | + yarn lerna run build --scope=@cypress/schematic + name: Build + Install + - run: + command: | + yarn test + name: Run unit tests + working_directory: npm/cypress-schematic + working_directory: ~/cypress + npm-eslint-plugin-dev: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 parameters: - <<: *defaultsParameters - resource_class: - type: string - default: large - percy: - type: boolean + executor: + default: cy-doc + type: executor + only-cache-for-root-user: default: false - resource_class: << parameters.resource_class >> - parallelism: 8 - steps: - - run-new-ui-tests: - browser: chrome - executor: << parameters.executor >> - percy: << parameters.percy >> - package: app - type: e2e - - 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-inject-document-domain: - <<: *defaults - parallelism: 5 - resource_class: medium+ - steps: - - run-driver-integration-tests: - browser: chrome - install-chrome-channel: stable - inject-document-domain: true - - driver-integration-tests-chrome-beta: - <<: *defaults - resource_class: medium+ - parallelism: 5 - steps: - - run-driver-integration-tests: - browser: chrome:beta - install-chrome-channel: beta - - driver-integration-tests-chrome-beta-inject-document-domain: - <<: *defaults - resource_class: medium+ - parallelism: 5 - steps: - - run-driver-integration-tests: - browser: chrome:beta - install-chrome-channel: beta - inject-document-domain: true - - driver-integration-tests-firefox: - <<: *defaults - resource_class: medium+ - parallelism: 5 - steps: - - run-driver-integration-tests: - browser: firefox - - driver-integration-tests-electron: - <<: *defaults - parallelism: 5 - steps: - - run-driver-integration-tests: - browser: electron - - driver-integration-tests-webkit: - <<: *defaults - resource_class: large - parallelism: 5 + type: boolean steps: - - run-driver-integration-tests: - browser: webkit - # inject document domain must be true for webkit, as cy.origin is not supported - inject-document-domain: true - - run-reporter-component-tests-chrome: - <<: *defaults + - restore_cached_workspace + - run: + command: yarn workspace @cypress/eslint-plugin-dev test + name: Run tests + working_directory: ~/cypress + npm-grep: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 parameters: - <<: *defaultsParameters - percy: - type: boolean + executor: + default: cy-doc + type: executor + only-cache-for-root-user: default: false - parallelism: 2 - steps: - - run-new-ui-tests: - browser: chrome - executor: << parameters.executor >> - percy: << parameters.percy >> - package: reporter - type: ct - - reporter-integration-tests: - <<: *defaults - resource_class: medium+ - parallelism: 3 + type: boolean + resource_class: small steps: - restore_cached_workspace - run: - command: yarn build-for-tests - working_directory: packages/reporter + command: yarn workspace @cypress/grep cy:run + name: Run tests + - sanitize-verify-and-store-mocha-results: + testResultsPath: npm/grep/test_results + working_directory: ~/cypress + npm-mount-utils: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + steps: + - restore_cached_workspace - run: - command: | - 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 \ - yarn percy exec --parallel -- -- \ - yarn cypress:run --record --parallel --group reporter --runner-ui - working_directory: packages/reporter - - sanitize-verify-and-store-mocha-results - - run-webpack-dev-server-integration-tests: - <<: *defaults - resource_class: medium+ - parallelism: 2 + command: yarn lerna run build --scope=@cypress/mount-utils + name: Build + working_directory: ~/cypress + npm-puppeteer-cypress-tests: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: small steps: - restore_cached_workspace - restore_cached_system_tests_deps - install-browsers: install-chrome: true - run: - command: | - 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 \ - yarn percy exec --parallel -- -- \ - yarn cypress:run --record --parallel --group webpack-dev-server - working_directory: npm/webpack-dev-server + command: yarn cypress:run + working_directory: npm/puppeteer - sanitize-verify-and-store-mocha-results - - run-vite-dev-server-integration-tests: - <<: *defaults - # parallelism: 3 TODO: Add parallelism once we have more specs + working_directory: ~/cypress + npm-puppeteer-unit-tests: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean steps: - restore_cached_workspace - - restore_cached_system_tests_deps - - install-browsers: - install-chrome: true - run: - command: | - 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 \ - yarn percy exec --parallel -- -- \ - yarn cypress:run --record --parallel --group vite-dev-server - working_directory: npm/vite-dev-server - - sanitize-verify-and-store-mocha-results - - npm-webpack-preprocessor: - <<: *defaults + command: yarn lerna run build --scope=@cypress/puppeteer + name: Build + - run: + command: yarn test + name: Run tests + working_directory: npm/puppeteer + - sanitize-verify-and-store-mocha-results: + testResultsPath: npm/puppeteer/test_results + working_directory: ~/cypress + npm-react: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean steps: - restore_cached_workspace - run: + command: yarn lerna run build --scope=@cypress/react name: Build - command: yarn lerna run build --scope=@cypress/webpack-preprocessor - run: + command: yarn test name: Run tests - command: yarn workspace @cypress/webpack-preprocessor test - - npm-webpack-dev-server: - <<: *defaults + working_directory: npm/react + - sanitize-verify-and-store-mocha-results: + testResultsPath: npm/react/test_results + working_directory: ~/cypress + npm-release: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: medium+ steps: - restore_cached_workspace - - restore_cached_system_tests_deps - run: - name: Run tests - command: yarn workspace @cypress/webpack-dev-server test - - run: - name: Run tests - command: yarn workspace @cypress/webpack-dev-server test - + command: yarn npm-release + name: Release packages after all jobs pass + working_directory: ~/cypress npm-vite-dev-server: - <<: *defaults + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean steps: - restore_cached_workspace - run: - name: Run tests command: yarn test + name: Run tests working_directory: npm/vite-dev-server - sanitize-verify-and-store-mocha-results: testResultsPath: npm/vite-dev-server/test_results - - npm-webpack-batteries-included-preprocessor: - <<: *defaults - resource_class: small + working_directory: ~/cypress + npm-vite-plugin-cypress-esm: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean steps: - restore_cached_workspace - run: + command: yarn lerna run build --scope=@cypress/vite-plugin-cypress-esm + name: Build + - run: + command: yarn test name: Run tests - command: yarn workspace @cypress/webpack-batteries-included-preprocessor test - + working_directory: npm/vite-plugin-cypress-esm + - sanitize-verify-and-store-mocha-results: + testResultsPath: npm/vite-plugin-cypress-esm/test_results + working_directory: ~/cypress npm-vue: - <<: *defaults + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean steps: - restore_cached_workspace - run: - name: Build command: yarn lerna run build --scope=@cypress/vue + name: Build - run: - name: Run tests command: yarn test + name: Run tests working_directory: npm/vue - sanitize-verify-and-store-mocha-results: testResultsPath: npm/vue/test_results - - npm-angular: - <<: *defaults - steps: - - restore_cached_workspace - - run: - name: Build - command: yarn lerna run build --scope=@cypress/angular - - npm-puppeteer-unit-tests: - <<: *defaults + working_directory: ~/cypress + npm-webpack-batteries-included-preprocessor: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: small steps: - restore_cached_workspace - run: - name: Build - command: yarn lerna run build --scope=@cypress/puppeteer - - run: + command: yarn workspace @cypress/webpack-batteries-included-preprocessor test name: Run tests - command: yarn test - working_directory: npm/puppeteer - - sanitize-verify-and-store-mocha-results: - testResultsPath: npm/puppeteer/test_results - - npm-puppeteer-cypress-tests: - <<: *defaults - resource_class: small + working_directory: ~/cypress + npm-webpack-dev-server: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean steps: - restore_cached_workspace - restore_cached_system_tests_deps - - install-browsers: - install-chrome: true - - run: - command: yarn cypress:run - working_directory: npm/puppeteer - - sanitize-verify-and-store-mocha-results - - npm-react: - <<: *defaults - steps: - - restore_cached_workspace - - run: - name: Build - command: yarn lerna run build --scope=@cypress/react - run: + command: yarn workspace @cypress/webpack-dev-server test name: Run tests - command: yarn test - working_directory: npm/react - - sanitize-verify-and-store-mocha-results: - testResultsPath: npm/react/test_results - - npm-vite-plugin-cypress-esm: - <<: *defaults - steps: - - restore_cached_workspace - - run: - name: Build - command: yarn lerna run build --scope=@cypress/vite-plugin-cypress-esm - run: + command: yarn workspace @cypress/webpack-dev-server test name: Run tests - command: yarn test - working_directory: npm/vite-plugin-cypress-esm - - sanitize-verify-and-store-mocha-results: - testResultsPath: npm/vite-plugin-cypress-esm/test_results - - npm-mount-utils: - <<: *defaults + working_directory: ~/cypress + npm-webpack-preprocessor: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean steps: - restore_cached_workspace - run: + command: yarn lerna run build --scope=@cypress/webpack-preprocessor name: Build - command: yarn lerna run build --scope=@cypress/mount-utils - - npm-grep: - <<: *defaults - resource_class: small - steps: - - restore_cached_workspace - - run: - name: Run tests - command: yarn workspace @cypress/grep cy:run - - sanitize-verify-and-store-mocha-results: - testResultsPath: npm/grep/test_results - - npm-eslint-plugin-dev: - <<: *defaults - steps: - - restore_cached_workspace - run: + command: yarn workspace @cypress/webpack-preprocessor test name: Run tests - command: yarn workspace @cypress/eslint-plugin-dev test - - npm-cypress-schematic: - <<: *defaults + working_directory: ~/cypress + percy-finalize: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + required_env_var: + type: env_var_name + resource_class: small steps: - restore_cached_workspace - run: - name: Build + Install command: | - yarn lerna run build --scope=@cypress/schematic + if [[ -v <> ]]; then + echo "Internal PR, good to go" + else + echo "This is an external PR, cannot access other services" + circleci-agent step halt + fi + name: Check if <> is set - run: - name: Run unit tests command: | - yarn test - working_directory: npm/cypress-schematic - - npm-release: - <<: *defaults - resource_class: medium+ - steps: - - restore_cached_workspace - - run: - name: Release packages after all jobs pass - command: yarn npm-release - - create-build-artifacts: - <<: *defaults - parameters: - <<: *defaultsParameters + PERCY_PARALLEL_NONCE=$CIRCLE_WORKFLOW_WORKSPACE_ID \ + yarn percy build:finalize || yarn percy build:finalize + name: Finalize percy build - allows single retry + working_directory: ~/cypress + ready-to-release: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: small + steps: + - run: + command: echo 'Ready to release' + name: Ready to release + working_directory: ~/cypress + reporter-integration-tests: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 3 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: medium+ + steps: + - restore_cached_workspace + - run: + command: yarn build-for-tests + working_directory: packages/reporter + - run: + command: | + 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 \ + yarn percy exec --parallel -- -- \ + yarn cypress:run --record --parallel --group reporter --runner-ui + working_directory: packages/reporter + - sanitize-verify-and-store-mocha-results + working_directory: ~/cypress + run-app-component-tests-chrome: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 7 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + percy: + default: false + type: boolean resource_class: + default: medium+ type: string - default: xlarge - resource_class: << parameters.resource_class >> steps: - - restore_cached_workspace - # this is a temporary work around while we wait for circle to resolve issues with packages - # with an @ character in windows during save_cache. - # @see https://github.com/cypress-io/cypress/issues/30343 for more details. - - when: - condition: - equal: [ *windows-executor, << parameters.executor >> ] - steps: - - run: - name: reinstall dependencies to work around cache issue (Windows only) - command: rm -rf node_modules && yarn - - check-if-binary-exists - - build-and-package-binary - - build-cypress-npm-package: + - run-new-ui-tests: + browser: chrome executor: << parameters.executor >> - - setup_should_persist_artifacts - - verify_should_persist_artifacts - - upload-build-artifacts - - post-install-comment - - create-and-trigger-packaging-artifacts: - <<: *defaults + package: app + percy: << parameters.percy >> + type: ct + working_directory: ~/cypress + run-app-integration-tests-chrome: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 8 parameters: - <<: *defaultsParameters + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + percy: + default: false + type: boolean resource_class: + default: large type: string - default: small resource_class: << parameters.resource_class >> steps: - - maybe_skip_binary_jobs - - restore_cached_workspace - - check-if-binary-exists - - setup_should_persist_artifacts - - trigger-publish-binary-pipeline - - get-published-artifacts: - <<: *defaults + - run-new-ui-tests: + browser: chrome + executor: << parameters.executor >> + package: app + percy: << parameters.percy >> + type: e2e + working_directory: ~/cypress + run-frontend-shared-component-tests-chrome: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 3 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + percy: + default: false + type: boolean + steps: + - run-new-ui-tests: + browser: chrome + executor: << parameters.executor >> + package: frontend-shared + percy: << parameters.percy >> + type: ct + working_directory: ~/cypress + run-launchpad-component-tests-chrome: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 7 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + percy: + default: false + type: boolean + steps: + - run-new-ui-tests: + browser: chrome + executor: << parameters.executor >> + package: launchpad + percy: << parameters.percy >> + type: ct + working_directory: ~/cypress + run-launchpad-integration-tests-chrome: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 3 parameters: - <<: *defaultsParameters + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + percy: + default: false + type: boolean resource_class: + default: large type: string - default: medium resource_class: << parameters.resource_class >> + steps: + - run-new-ui-tests: + browser: chrome + executor: << parameters.executor >> + package: launchpad + percy: << parameters.percy >> + type: e2e + working_directory: ~/cypress + run-reporter-component-tests-chrome: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 2 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + percy: + default: false + type: boolean + steps: + - run-new-ui-tests: + browser: chrome + executor: << parameters.executor >> + package: reporter + percy: << parameters.percy >> + type: ct + working_directory: ~/cypress + run-vite-dev-server-integration-tests: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + steps: + - restore_cached_workspace + - restore_cached_system_tests_deps + - install-browsers: + install-chrome: true + - run: + command: | + 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 \ + yarn percy exec --parallel -- -- \ + yarn cypress:run --record --parallel --group vite-dev-server + working_directory: npm/vite-dev-server + - sanitize-verify-and-store-mocha-results + working_directory: ~/cypress + run-webpack-dev-server-integration-tests: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 2 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: medium+ + steps: + - restore_cached_workspace + - restore_cached_system_tests_deps + - install-browsers: + install-chrome: true + - run: + command: | + 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 \ + yarn percy exec --parallel -- -- \ + yarn cypress:run --record --parallel --group webpack-dev-server + working_directory: npm/webpack-dev-server + - sanitize-verify-and-store-mocha-results + working_directory: ~/cypress + server-integration-tests: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + steps: + - restore_cached_workspace + - install-browsers: + install-chrome: true + - run: yarn test-integration --scope=@packages/server + - sanitize-verify-and-store-mocha-results: + expectedResultCount: 1 + working_directory: ~/cypress + server-performance-tests: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + steps: + - restore_cached_workspace + - install-browsers: + install-chrome: true + install-firefox: true + - run: + command: yarn workspace @packages/server test-performance + - sanitize-verify-and-store-mocha-results: + expectedResultCount: 1 + working_directory: ~/cypress + server-unit-tests: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + steps: + - restore_cached_workspace + - run: yarn test-unit --scope=@packages/server + - sanitize-verify-and-store-mocha-results: + expectedResultCount: 1 + working_directory: ~/cypress + server-unit-tests-cloud-environment: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: + default: medium + type: string + resource_class: << parameters.resource_class >> + steps: + - restore_cached_workspace + - when: + condition: + equal: + - environment: + PLATFORM: darwin + machine: true + - << parameters.executor >> + steps: + - run: rm -f /tmp/cypress/junit/* + - when: + condition: + equal: + - environment: + PLATFORM: windows + machine: + image: windows-server-2022-gui:stable + shell: bash.exe -eo pipefail + resource_class: windows.large + - << parameters.executor >> + steps: + - run: + command: rm -rf node_modules && yarn + name: reinstall dependencies to work around cache issue (Windows only) + - run: yarn workspace @packages/server test-unit cloud/environment_spec.ts + - sanitize-verify-and-store-mocha-results: + expectedResultCount: 1 + working_directory: ~/cypress + svelte-webpack-system-test: + docker: + - image: cypress/base-internal:22.15.1-bullseye + environment: + REPO_DIR: /root/cypress + TEST_PROJECT_DIR: ./system-tests/projects/svelte-webpack-configured + USE_YARN_TO_INSTALL_CYPRESS_BINARY: true + parallelism: 1 + steps: + - maybe_skip_binary_jobs + - attach_workspace: + at: ~/ + - run: + command: yarn install --ignore-scripts + name: Install monorepo dependencies + - run: + command: cd ./system-tests/projects/svelte-webpack-configured && yarn + name: install dependencies + - run: + command: | + # we need to bootstrap the binary into our project directory and run the tests + source ./system-tests/scripts/bootstrap-docker-container.sh 'yarn cypress run --component --spec src/mount.cy.ts src/App.cy.ts' + name: Bootstrap the Cypress binary and run binary system test + working_directory: ~/cypress + system-tests-chrome: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 8 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: medium+ + steps: + - run-system-tests: + browser: chrome + working_directory: ~/cypress + system-tests-electron: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 8 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: medium+ + steps: + - run-system-tests: + browser: electron + working_directory: ~/cypress + system-tests-firefox: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 8 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: medium+ + steps: + - run-system-tests: + browser: firefox + working_directory: ~/cypress + system-tests-node-modules-install: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + steps: + - restore_cached_workspace + - update_cached_system_tests_deps + working_directory: ~/cypress + system-tests-non-root: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + steps: + - restore_cached_workspace + - run: + command: yarn workspace @tooling/system-tests test:ci "test/non_root*spec*" + --browser electron + environment: + CYPRESS_COMMERCIAL_RECOMMENDATIONS: "0" + - sanitize-verify-and-store-mocha-results + working_directory: ~/cypress + system-tests-webkit: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 8 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: medium+ + steps: + - run-system-tests: + browser: webkit + working_directory: ~/cypress + test-against-staging: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + steps: + - restore_cached_workspace + - clone-repo-and-checkout-branch: + repo: cypress-test-tiny + - run: + command: | + CYPRESS_PROJECT_ID=$TEST_TINY_PROJECT_ID \ + CYPRESS_RECORD_KEY=$TEST_TINY_RECORD_KEY \ + CYPRESS_INTERNAL_ENV=staging \ + yarn cypress:run --project /tmp/cypress-test-tiny --record + name: Run test project + working_directory: ~/cypress + test-binary-against-cypress-realworld-app: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: medium+ + steps: + - test-binary-against-rwa: + browser: chrome + repo: cypress-realworld-app + working_directory: ~/cypress + test-binary-against-kitchensink: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + steps: + - maybe_skip_binary_jobs + - test-binary-against-repo: + browser: electron + repo: cypress-example-kitchensink + working_directory: ~/cypress + test-binary-against-kitchensink-chrome: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + steps: + - test-binary-against-repo: + browser: chrome + executor: << parameters.executor >> + repo: cypress-example-kitchensink + working_directory: ~/cypress + test-binary-against-kitchensink-firefox: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + steps: + - test-binary-against-repo: + browser: firefox + repo: cypress-example-kitchensink + working_directory: ~/cypress + test-binary-against-recipes: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 4 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + steps: + - test-binary-against-repo: + browser: electron + command: npm run test:ci -- --chunk $CIRCLE_NODE_INDEX --total-chunks + $CIRCLE_NODE_TOTAL + repo: cypress-example-recipes + working_directory: ~/cypress + test-binary-against-recipes-chrome: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + steps: + - test-binary-against-repo: + browser: chrome + command: npm run test:ci:chrome + repo: cypress-example-recipes + working_directory: ~/cypress + test-binary-against-recipes-firefox: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + steps: + - test-binary-against-repo: + browser: firefox + command: npm run test:ci:firefox + repo: cypress-example-recipes + working_directory: ~/cypress + test-binary-against-staging: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + steps: + - restore_workspace_binaries + - clone-repo-and-checkout-branch: + repo: cypress-test-tiny + - run: + command: CYPRESS_INSTALL_BINARY=~/cypress/cypress.zip npm i --legacy-peer-deps + ~/cypress/cypress.tgz + name: Install Cypress + working_directory: /tmp/cypress-test-tiny + - run: + command: | + CYPRESS_PROJECT_ID=$TEST_TINY_PROJECT_ID \ + CYPRESS_RECORD_KEY=$TEST_TINY_RECORD_KEY \ + CYPRESS_INTERNAL_ENV=staging \ + $(yarn bin cypress) run --record + name: Run test project + working_directory: /tmp/cypress-test-tiny + working_directory: ~/cypress + test-binary-against-todomvc-firefox: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + steps: + - test-binary-against-repo: + browser: firefox + repo: cypress-example-todomvc + working_directory: ~/cypress + test-binary-as-specific-user: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + steps: + - maybe_skip_binary_jobs + - restore_workspace_binaries + - clone-repo-and-checkout-branch: + repo: cypress-test-tiny + - run: whoami + - run: pwd + - run: node -e 'console.log(process.geteuid())' + - run: ls -l + - run: ls -l cypress.zip cypress.tgz + - run: + command: CYPRESS_INSTALL_BINARY=~/cypress/cypress.zip npm i + ~/cypress/cypress.tgz + name: Install Cypress + working_directory: /tmp/cypress-test-tiny + - run: + command: $(yarn bin cypress) help + name: Cypress help + working_directory: /tmp/cypress-test-tiny + - run: + command: $(yarn bin cypress) info + name: Cypress info + working_directory: /tmp/cypress-test-tiny + - run: + command: DEBUG=cypress:cli $(yarn bin cypress) verify + name: Verify Cypress binary + working_directory: /tmp/cypress-test-tiny + - run: + command: DEBUG=cypress:cli $(yarn bin cypress) run + name: Run Cypress binary + working_directory: /tmp/cypress-test-tiny + working_directory: ~/cypress + test-full-typescript-project: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + description: Executor name to use + type: executor + resource_class: small steps: - maybe_skip_binary_jobs - - restore_cached_workspace + - restore_workspace_binaries + - clone-repo-and-checkout-branch: + repo: cypress-test-tiny - run: - name: Check pipeline info - command: cat ~/triggered_pipeline.json - - setup_should_persist_artifacts + command: | + git checkout full-typescript + name: Checkout Typescript Example + working_directory: /tmp/cypress-test-tiny - run: - name: Download binary artifacts command: | - source ./scripts/ensure-node.sh - node ./scripts/binary/get-published-artifacts.js --pipelineInfo ~/triggered_pipeline.json --platformKey $(node ./scripts/get-platform-key.js) - - persist_to_workspace: - root: ~/ - paths: - - cypress/cypress.zip - - cypress/cypress.tgz - - verify_should_persist_artifacts - - persist_to_workspace: - root: ~/ - paths: - - cypress/binary-url.json - - cypress/npm-package-url.json - - post-install-comment: - package_url_path: ~/cypress/npm-package-url.json - binary_url_path: ~/cypress/binary-url.json - + npm install /root/cypress/cypress.tgz typescript + environment: + CYPRESS_INSTALL_BINARY: /root/cypress/cypress.zip + name: "Install dependencies 📦" + working_directory: /tmp/cypress-test-tiny + - run: + command: npm run cypress:run + name: "Run project tests 🗳" + working_directory: /tmp/cypress-test-tiny + working_directory: ~/cypress test-kitchensink: - <<: *defaults + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 parameters: - <<: *defaultsParameters + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean resource_class: - type: string default: medium+ + type: string resource_class: << parameters.resource_class >> steps: - restore_cached_workspace @@ -2511,1381 +3191,1872 @@ jobs: repo: cypress-example-kitchensink - install-required-node - run: - name: Install prod dependencies command: yarn --production --ignore-engines + name: Install prod dependencies working_directory: /tmp/cypress-example-kitchensink - run: - name: Example server + background: true command: yarn start + name: Example server working_directory: /tmp/cypress-example-kitchensink - background: true - run: - name: Run Kitchensink example project command: | yarn cypress:run --project /tmp/cypress-example-kitchensink - + name: Run Kitchensink example project + working_directory: ~/cypress test-kitchensink-against-staging: - <<: *defaults + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean steps: - restore_cached_workspace - clone-repo-and-checkout-branch: repo: cypress-example-kitchensink - install-required-node - run: - name: Install prod dependencies command: yarn --production + name: Install prod dependencies working_directory: /tmp/cypress-example-kitchensink - run: - name: Example server + background: true command: yarn start + name: Example server working_directory: /tmp/cypress-example-kitchensink - background: true - run: - name: Run Kitchensink example project command: | source ./scripts/ensure-node.sh CYPRESS_PROJECT_ID=$TEST_KITCHENSINK_PROJECT_ID \ CYPRESS_RECORD_KEY=$TEST_KITCHENSINK_RECORD_KEY \ CYPRESS_INTERNAL_ENV=staging \ yarn cypress:run --project /tmp/cypress-example-kitchensink --record - - test-against-staging: - <<: *defaults - steps: - - restore_cached_workspace - - clone-repo-and-checkout-branch: - repo: cypress-test-tiny - - run: - name: Run test project - command: | - CYPRESS_PROJECT_ID=$TEST_TINY_PROJECT_ID \ - CYPRESS_RECORD_KEY=$TEST_TINY_RECORD_KEY \ - CYPRESS_INTERNAL_ENV=staging \ - yarn cypress:run --project /tmp/cypress-test-tiny --record - + name: Run Kitchensink example project + working_directory: ~/cypress test-npm-module-and-verify-binary: - <<: *defaults + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean resource_class: small steps: - restore_cached_workspace - # make sure we have cypress.zip received - run: ls -l - run: ls -l cypress.zip cypress.tgz - run: mkdir test-binary - run: + command: npm init -y name: Create new NPM package working_directory: test-binary - command: npm init -y - run: - # install NPM from built NPM package folder - name: Install Cypress - working_directory: test-binary - # force installing the freshly built binary command: CYPRESS_INSTALL_BINARY=/root/cypress/cypress.zip npm i /root/cypress/cypress.tgz + name: Install Cypress + working_directory: test-binary - run: + command: $(yarn bin cypress) version name: Cypress version working_directory: test-binary - command: $(yarn bin cypress) version - run: + command: $(yarn bin cypress) verify name: Verify Cypress binary working_directory: test-binary - command: $(yarn bin cypress) verify - run: + command: $(yarn bin cypress) help name: Cypress help working_directory: test-binary - command: $(yarn bin cypress) help - run: + command: $(yarn bin cypress) info name: Cypress info working_directory: test-binary - command: $(yarn bin cypress) info - + working_directory: ~/cypress test-npm-module-on-minimum-node-version: - <<: *defaults - resource_class: small docker: - image: cypress/base-internal:22.15.1 + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: small steps: - maybe_skip_binary_jobs - restore_workspace_binaries - run: mkdir test-binary - run: + command: npm init -y name: Create new NPM package working_directory: test-binary - command: npm init -y - run: - name: Install Cypress - working_directory: test-binary command: CYPRESS_INSTALL_BINARY=/root/cypress/cypress.zip npm install /root/cypress/cypress.tgz + name: Install Cypress + working_directory: test-binary - run: + command: npx cypress verify name: Verify Cypress binary working_directory: test-binary - command: npx cypress verify - run: + command: npx cypress version name: Print Cypress version working_directory: test-binary - command: npx cypress version - run: + command: npx cypress info name: Cypress info working_directory: test-binary - command: npx cypress info - + working_directory: ~/cypress test-types-cypress-and-jest: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + description: Executor name to use + type: executor + wd: + default: /root/test-cypress-and-jest + description: Working directory, should be OUTSIDE cypress monorepo folder + type: string + resource_class: small + steps: + - maybe_skip_binary_jobs + - restore_workspace_binaries + - run: mkdir <> + - run: + command: npm init -y + name: Create new NPM package ⚗️ + working_directory: <> + - run: + command: | + npm install /root/cypress/cypress.tgz \ + typescript @types/jest enzyme @types/enzyme + environment: + CYPRESS_INSTALL_BINARY: /root/cypress/cypress.zip + name: "Install dependencies 📦" + working_directory: <> + - run: + command: | + echo "console.log('hello world')" > hello.ts + npx tsc hello.ts --noEmit + name: Test types clash ⚔️ + working_directory: <> + working_directory: ~/cypress + unit-tests: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: + default: medium + type: string + resource_class: << parameters.resource_class >> + steps: + - restore_cached_workspace + - install-browsers: + executor: << parameters.executor >> + install-chrome: true + - when: + condition: + equal: + - environment: + PLATFORM: windows + machine: + image: windows-server-2022-gui:stable + shell: bash.exe -eo pipefail + resource_class: windows.large + - << parameters.executor >> + steps: + - run: yarn test-scripts scripts/**/*spec.js + - sanitize-verify-and-store-mocha-results + - unless: + condition: + equal: + - environment: + PLATFORM: windows + machine: + image: windows-server-2022-gui:stable + shell: bash.exe -eo pipefail + resource_class: windows.large + - << parameters.executor >> + steps: + - run: yarn test-scripts + - run: yarn test + - run: yarn lerna run types + - sanitize-verify-and-store-mocha-results: + expectedResultCount: 20 + working_directory: ~/cypress + v8-integration-tests: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 + parameters: + executor: + default: cy-doc + type: executor + only-cache-for-root-user: + default: false + type: boolean + resource_class: + default: medium + type: string + resource_class: << parameters.resource_class >> + steps: + - restore_cached_workspace + - restore_cached_system_tests_deps + - when: + condition: + equal: + - environment: + PLATFORM: windows + machine: + image: windows-server-2022-gui:stable + shell: bash.exe -eo pipefail + resource_class: windows.large + - << parameters.executor >> + steps: + - run: + command: rm -rf node_modules && yarn + name: reinstall dependencies to work around cache issue (Windows only) + - when: + condition: + equal: + - environment: + PLATFORM: darwin + machine: true + - << parameters.executor >> + steps: + - run: rm -f /tmp/cypress/junit/* + - unless: + condition: + or: + - equal: + - environment: + DISABLE_SNAPSHOT_REQUIRE: 1 + PLATFORM: linux + machine: + image: ubuntu-2004:2024.11.1 + resource_class: arm.medium + - << parameters.executor >> + steps: + - run: + command: | + source ./scripts/ensure-node.sh + yarn test-integration --scope=@tooling/{packherd,v8-snapshot,electron-mksnapshot} + name: Run v8 integration tests + - sanitize-verify-and-store-mocha-results: + expectedResultCount: 3 + - when: + condition: + or: + - equal: + - environment: + DISABLE_SNAPSHOT_REQUIRE: 1 + PLATFORM: linux + machine: + image: ubuntu-2004:2024.11.1 + resource_class: arm.medium + - << parameters.executor >> + steps: + - run: + command: | + source ./scripts/ensure-node.sh + yarn test-integration --scope=@tooling/packherd + name: Run v8 integration tests + - sanitize-verify-and-store-mocha-results: + expectedResultCount: 1 + working_directory: ~/cypress + verify-accessibility-results: + environment: + CIRCLE_ARTIFACTS: /tmp/artifacts + COLUMNS: 100 + LINES: 24 + TZ: /usr/share/zoneinfo/America/New_York + executor: <> + parallelism: 1 parameters: executor: - description: Executor name to use - type: executor default: cy-doc - wd: - description: Working directory, should be OUTSIDE cypress monorepo folder - type: string - default: /root/test-cypress-and-jest - <<: *defaults + type: executor + only-cache-for-root-user: + default: false + type: boolean resource_class: small steps: - - maybe_skip_binary_jobs - - restore_workspace_binaries - - run: mkdir <> + - run: | + if [[ -z "$MAIN_RECORD_KEY" ]]; then + echo "skipping for contributor PRs since we don't record to the cloud" + circleci-agent step halt + fi + - update_known_hosts - run: - name: Create new NPM package ⚗️ - working_directory: <> - command: npm init -y + command: git clone -b "$CIRCLE_BRANCH" "$CIRCLE_REPOSITORY_URL" --depth 1 + name: checkout - run: - name: Install dependencies 📦 - working_directory: <> - environment: - CYPRESS_INSTALL_BINARY: /root/cypress/cypress.zip - # let's install Cypress, Jest and any other package that might conflict - # https://github.com/cypress-io/cypress/issues/6690 - - # Todo: Add `jest` back into the list once https://github.com/yargs/yargs-parser/issues/452 - # is resolved. command: | - npm install /root/cypress/cypress.tgz \ - typescript @types/jest enzyme @types/enzyme + npm install https://cdn.cypress.io/extract-cloud-results/v1/extract-cloud-results.tgz + name: Install extract-cloud-results package - run: - name: Test types clash ⚔️ - working_directory: <> command: | - echo "console.log('hello world')" > hello.ts - npx tsc hello.ts --noEmit - - test-full-typescript-project: + cp ./cypress/scripts/verify-accessibility-results.js verify-accessibility-results.js + CYPRESS_RECORD_KEY=$MAIN_RECORD_KEY node verify-accessibility-results.js + name: Verify Accessibility Results + working_directory: ~/cypress + verify-release-readiness: + environment: + GITHUB_TOKEN: $GH_TOKEN + executor: <> + parallelism: 1 parameters: executor: - description: Executor name to use - type: executor default: cy-doc - <<: *defaults + type: executor + only-cache-for-root-user: + default: false + type: boolean resource_class: small + steps: + - restore_cached_workspace + - update_known_hosts + - run: yarn test-npm-package-release-script + - run: node ./scripts/semantic-commits/validate-binary-changelog.js + - store_artifacts: + path: /tmp/releaseData + working_directory: ~/cypress + yarn-pnp-preprocessor-system-test: + docker: + - image: cypress/base-internal:22.15.1-yarn-berry + environment: + REPO_DIR: /root/cypress + TEST_PROJECT_DIR: ./system-tests/projects/yarn-v4.3.1-pnp-dep-resolution + USE_YARN_TO_INSTALL_CYPRESS_BINARY: true + parallelism: 1 steps: - maybe_skip_binary_jobs - - restore_workspace_binaries - - clone-repo-and-checkout-branch: - repo: cypress-test-tiny + - attach_workspace: + at: ~/ - run: - name: Checkout Typescript Example - working_directory: /tmp/cypress-test-tiny command: | - git checkout full-typescript + # we need to install the monorepo dependencies here in a fresh manner. + # set to the expected version of yarn and install the dependencies + yarn set version 1.22.22 + yarn install --ignore-scripts + name: Install monorepo dependencies with yarn v1.22.22 - run: - name: Install dependencies 📦 - working_directory: /tmp/cypress-test-tiny - environment: - CYPRESS_INSTALL_BINARY: /root/cypress/cypress.zip command: | - npm install /root/cypress/cypress.tgz typescript - - run: - name: Run project tests 🗳 - working_directory: /tmp/cypress-test-tiny - command: npm run cypress:run - - # install NPM + binary zip and run against staging API - test-binary-against-staging: - <<: *defaults - steps: - - restore_workspace_binaries - - clone-repo-and-checkout-branch: - repo: cypress-test-tiny - - run: - name: Install Cypress - working_directory: /tmp/cypress-test-tiny - # force installing the freshly built binary - command: CYPRESS_INSTALL_BINARY=~/cypress/cypress.zip npm i --legacy-peer-deps - ~/cypress/cypress.tgz + yarn set version 4.3.1 + cd ./system-tests/projects/yarn-v4.3.1-pnp-dep-resolution && yarn + name: install dependencies in yarn-v4.3.1-pnp-dep-resolution with yarn berry + 4.3.1 - run: - name: Run test project - working_directory: /tmp/cypress-test-tiny command: | - CYPRESS_PROJECT_ID=$TEST_TINY_PROJECT_ID \ - CYPRESS_RECORD_KEY=$TEST_TINY_RECORD_KEY \ - CYPRESS_INTERNAL_ENV=staging \ - $(yarn bin cypress) run --record - - test-binary-against-recipes-firefox: - <<: *defaults - steps: - - test-binary-against-repo: - repo: cypress-example-recipes - command: npm run test:ci:firefox - browser: firefox - - test-binary-against-recipes-chrome: - <<: *defaults - steps: - - test-binary-against-repo: - repo: cypress-example-recipes - command: npm run test:ci:chrome - browser: chrome - - test-binary-against-recipes: - <<: *defaults - parallelism: 4 - steps: - - test-binary-against-repo: - repo: cypress-example-recipes - # 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 - # built test runner against a pull request in the repo - # cypress-example-recipes. - # Imagine you are working on a feature and want to show / test a recipe - # You would need to run the built test runner before release - # against a PR that cannot be merged until the new version - # of the test runner is released. - # Use: - # specify pull request number - # and the recipe folder - - # test-binary-against-recipe-pull-request: - # <<: *defaults - # steps: - # # test a specific pull request by number from cypress-example-recipes - # - test-binary-against-repo: - # repo: cypress-example-recipes - # command: npm run test:ci - # pull_request_id: 515 - # folder: examples/fundamentals__typescript - - test-binary-against-kitchensink: - <<: *defaults - steps: - - maybe_skip_binary_jobs - - test-binary-against-repo: - repo: cypress-example-kitchensink - browser: electron - - test-binary-against-kitchensink-firefox: - <<: *defaults - steps: - - test-binary-against-repo: - repo: cypress-example-kitchensink - browser: firefox - - test-binary-against-kitchensink-chrome: - <<: *defaults - steps: - - test-binary-against-repo: - repo: cypress-example-kitchensink - browser: chrome - executor: << parameters.executor >> - - test-binary-against-todomvc-firefox: - <<: *defaults - steps: - - test-binary-against-repo: - repo: cypress-example-todomvc - browser: firefox - - test-binary-against-cypress-realworld-app: - <<: *defaults - resource_class: medium+ - steps: - - test-binary-against-rwa: - repo: cypress-realworld-app - browser: chrome - - test-binary-as-specific-user: - <<: *defaults - steps: - - maybe_skip_binary_jobs - - restore_workspace_binaries - - clone-repo-and-checkout-branch: - repo: cypress-test-tiny - # the user should be "node" - - run: whoami - - run: pwd - # prints the current user's effective user id - # for root it is 0 - # for other users it is a positive integer - - run: node -e 'console.log(process.geteuid())' - # make sure the binary and NPM package files are present - - run: ls -l - - run: ls -l cypress.zip cypress.tgz - - run: - # install NPM from built NPM package folder - name: Install Cypress - working_directory: /tmp/cypress-test-tiny - # force installing the freshly built binary - command: CYPRESS_INSTALL_BINARY=~/cypress/cypress.zip npm i - ~/cypress/cypress.tgz - - run: - name: Cypress help - working_directory: /tmp/cypress-test-tiny - command: $(yarn bin cypress) help - - run: - name: Cypress info - working_directory: /tmp/cypress-test-tiny - command: $(yarn bin cypress) info - - run: - name: Verify Cypress binary - working_directory: /tmp/cypress-test-tiny - command: DEBUG=cypress:cli $(yarn bin cypress) verify - - run: - name: Run Cypress binary - working_directory: /tmp/cypress-test-tiny - command: DEBUG=cypress:cli $(yarn bin cypress) run - -linux-x64-workflow: &linux-x64-workflow - jobs: - - node_modules_install: - build-better-sqlite3: true - - build: - context: test-runner:env-canary - requires: - - node_modules_install - - check-ts: - requires: - - build - - lint: - name: linux-lint - requires: - - build - - percy-finalize: - context: test-runner:percy - required_env_var: PERCY_TOKEN - requires: - - cli-visual-tests - - reporter-integration-tests - - run-app-component-tests-chrome - - run-app-integration-tests-chrome - - run-frontend-shared-component-tests-chrome - - run-launchpad-component-tests-chrome - - run-launchpad-integration-tests-chrome - - run-reporter-component-tests-chrome - - run-webpack-dev-server-integration-tests - - run-vite-dev-server-integration-tests - # Cypress run must be completed to fetch Accessibility report - - verify-accessibility-results: - context: test-runner:cypress-record-key - requires: - - reporter-integration-tests - - run-app-component-tests-chrome - - run-app-integration-tests-chrome - - run-frontend-shared-component-tests-chrome - - run-launchpad-component-tests-chrome - - run-launchpad-integration-tests-chrome - - run-reporter-component-tests-chrome - - run-webpack-dev-server-integration-tests - - run-vite-dev-server-integration-tests - - driver-integration-tests-firefox - - driver-integration-tests-chrome - - driver-integration-tests-chrome-inject-document-domain - - driver-integration-tests-chrome-beta-inject-document-domain - - driver-integration-tests-electron - - driver-integration-tests-webkit - - driver-integration-memory-tests - - lint-types: - requires: - - build - # unit, integration and e2e tests - - cli-visual-tests: - context: test-runner:percy - requires: - - build - - unit-tests: - requires: - - build - - verify-release-readiness: - context: test-runner:npm-release - requires: - - build - - server-unit-tests: - requires: - - build - - server-integration-tests: - requires: - - build - - server-performance-tests: - requires: - - build - - system-tests-node-modules-install: - context: test-runner:performance-tracking - requires: - - build - - system-tests-chrome: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-electron: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-firefox: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-webkit: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-non-root: - context: test-runner:performance-tracking - executor: non-root-docker-user - requires: - - system-tests-node-modules-install - - driver-integration-tests-chrome: - context: test-runner:cypress-record-key - requires: - - build - - driver-integration-tests-chrome-inject-document-domain: - context: test-runner:cypress-record-key - requires: - - build - - driver-integration-tests-chrome-beta: - context: test-runner:cypress-record-key - requires: - - build - - driver-integration-tests-chrome-beta-inject-document-domain: - context: test-runner:cypress-record-key - requires: - - build - - driver-integration-tests-firefox: - context: test-runner:cypress-record-key - requires: - - build - - driver-integration-tests-electron: - context: test-runner:cypress-record-key - requires: - - build - - driver-integration-tests-webkit: - context: test-runner:cypress-record-key - requires: - - build - - driver-integration-memory-tests: - requires: - - build - - run-frontend-shared-component-tests-chrome: - context: - [ - test-runner:cypress-record-key, - test-runner:launchpad-tests, - test-runner:percy - ] - percy: true - requires: - - build - - run-launchpad-integration-tests-chrome: - context: - [ - test-runner:cypress-record-key, - test-runner:launchpad-tests, - test-runner:percy - ] - percy: true - requires: - - build - - run-launchpad-component-tests-chrome: - context: - [ - test-runner:cypress-record-key, - test-runner:launchpad-tests, - test-runner:percy - ] - percy: true - requires: - - build - - run-app-integration-tests-chrome: - context: - [ - test-runner:cypress-record-key, - test-runner:launchpad-tests, - test-runner:percy - ] - percy: true - requires: - - build - - run-webpack-dev-server-integration-tests: - context: [ test-runner:cypress-record-key, test-runner:percy ] - requires: - - system-tests-node-modules-install - - run-vite-dev-server-integration-tests: - context: [ test-runner:cypress-record-key, test-runner:percy ] - requires: - - system-tests-node-modules-install - - run-app-component-tests-chrome: - context: - [ - test-runner:cypress-record-key, - test-runner:launchpad-tests, - test-runner:percy - ] - percy: true - requires: - - build - - run-reporter-component-tests-chrome: - context: [ test-runner:cypress-record-key, test-runner:percy ] - percy: true - requires: - - build - - reporter-integration-tests: - context: [ test-runner:cypress-record-key, test-runner:percy ] - requires: - - build - - npm-webpack-dev-server: - requires: - - system-tests-node-modules-install - - npm-vite-dev-server: - requires: - - build - - npm-vite-plugin-cypress-esm: - requires: - - build - - npm-webpack-preprocessor: - requires: - - build - - npm-webpack-batteries-included-preprocessor: - requires: - - build - - npm-vue: - requires: - - build - - npm-puppeteer-unit-tests: - requires: - - build - - npm-puppeteer-cypress-tests: - requires: - - build - - npm-react: - requires: - - build - - npm-angular: - requires: - - build - - npm-mount-utils: - requires: - - build - - npm-grep: - requires: - - build - - npm-eslint-plugin-dev: - requires: - - build - - npm-cypress-schematic: - requires: - - build - - v8-integration-tests: - requires: - - system-tests-node-modules-install - - - ready-to-release: - # <<: *mainBuildFilters - requires: - - check-ts - - npm-angular - - npm-eslint-plugin-dev - - npm-puppeteer-unit-tests - - npm-puppeteer-cypress-tests - - npm-react - - npm-mount-utils - - npm-grep - - npm-vue - - npm-webpack-batteries-included-preprocessor - - npm-webpack-preprocessor - - npm-vite-dev-server - - npm-vite-plugin-cypress-esm - - npm-webpack-dev-server - - npm-cypress-schematic - - lint-types - - linux-lint - - percy-finalize - - driver-integration-tests-firefox - - driver-integration-tests-chrome - - driver-integration-tests-chrome-beta - - driver-integration-tests-chrome-inject-document-domain - - driver-integration-tests-chrome-beta-inject-document-domain - - driver-integration-tests-electron - - driver-integration-tests-webkit - - driver-integration-memory-tests - - system-tests-non-root - - system-tests-firefox - - system-tests-electron - - system-tests-chrome - - system-tests-webkit - - server-performance-tests - - server-integration-tests - - server-unit-tests - - "test binary as a non-root user" - - "test binary as a root user" - - test-types-cypress-and-jest - - test-full-typescript-project - - test-binary-against-kitchensink - - test-npm-module-on-minimum-node-version - - binary-system-tests - - yarn-pnp-preprocessor-system-test - - svelte-webpack-system-test - - test-kitchensink - - unit-tests - - verify-release-readiness - - v8-integration-tests - - - npm-release: - <<: *mainBuildFilters - context: test-runner:npm-release - requires: - - ready-to-release - - - create-and-trigger-packaging-artifacts: - context: - - test-runner:upload - - test-runner:build-binary - - publish-binary - requires: - - node_modules_install - - wait-for-binary-publish: - type: approval - requires: - - create-and-trigger-packaging-artifacts - - get-published-artifacts: - context: - - publish-binary - - test-runner:commit-status-checks - requires: - - wait-for-binary-publish - # various testing scenarios, like building full binary - # and testing it on a real project - - test-against-staging: - context: test-runner:record-tests - <<: *mainBuildFilters - requires: - - build - - test-kitchensink: - requires: - - build - - test-kitchensink-against-staging: - executor: kitchensink-executor - context: test-runner:record-tests - <<: *mainBuildFilters - requires: - - build - - test-npm-module-on-minimum-node-version: - context: publish-binary - requires: - - get-published-artifacts - - test-types-cypress-and-jest: - context: publish-binary - requires: - - get-published-artifacts - - test-full-typescript-project: - context: publish-binary - requires: - - get-published-artifacts - - test-binary-against-kitchensink: - context: publish-binary - requires: - - get-published-artifacts - - test-npm-module-and-verify-binary: - <<: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-staging: - context: test-runner:record-tests - <<: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-kitchensink-chrome: - <<: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-recipes-firefox: - <<: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-recipes-chrome: - <<: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-recipes: - <<: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-kitchensink-firefox: - <<: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-todomvc-firefox: - <<: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-cypress-realworld-app: - context: test-runner:cypress-record-key - <<: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-as-specific-user: - name: "test binary as a non-root user" - executor: non-root-docker-user - context: publish-binary - requires: - - get-published-artifacts - - test-binary-as-specific-user: - name: "test binary as a root user" - context: publish-binary - requires: - - get-published-artifacts - - binary-system-tests: - context: publish-binary - requires: - - get-published-artifacts - - system-tests-node-modules-install - - yarn-pnp-preprocessor-system-test: - context: publish-binary - requires: - - get-published-artifacts - - system-tests-node-modules-install - - svelte-webpack-system-test: - context: publish-binary - requires: - - get-published-artifacts - - system-tests-node-modules-install - -linux-x64-contributor-workflow: &linux-x64-contributor-workflow - jobs: - - node_modules_install - - build: - is_contributor_pr: true - requires: - - node_modules_install - # In subsequent jobs, we use some contexts that are restricted to members of the Cypress organization. - # This job will allow for a Cypress member to approve and run the rest of the restricted jobs in the pipeline after the contributor code has been reviewed. - - contributor-pr: - type: approval - requires: - - build - # verify-accessibility-results is required for status checks, however, it will be skipped for contributors so it - # can run in any order - - verify-accessibility-results - - check-ts: - requires: - - build - - lint: - name: linux-lint - requires: - - build - - percy-finalize: - context: test-runner:percy - required_env_var: PERCY_TOKEN # skips job if not defined (external PR) - requires: - - cli-visual-tests - - reporter-integration-tests - - run-app-component-tests-chrome - - run-app-integration-tests-chrome - - run-frontend-shared-component-tests-chrome - - run-launchpad-component-tests-chrome - - run-launchpad-integration-tests-chrome - - run-reporter-component-tests-chrome - - run-webpack-dev-server-integration-tests - - run-vite-dev-server-integration-tests - - lint-types: - requires: - - build - # unit, integration and e2e tests - - cli-visual-tests: - context: test-runner:percy - requires: - - contributor-pr - - unit-tests: - requires: - - build - - verify-release-readiness: - context: test-runner:npm-release - requires: - - contributor-pr - - server-unit-tests: - requires: - - build - - server-integration-tests: - requires: - - build - - server-performance-tests: - requires: - - build - - system-tests-node-modules-install: - context: test-runner:performance-tracking - requires: - - contributor-pr - - system-tests-chrome: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-electron: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-firefox: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-webkit: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-non-root: - context: test-runner:performance-tracking - executor: non-root-docker-user - requires: - - system-tests-node-modules-install - - driver-integration-tests-chrome: - context: test-runner:cypress-record-key - requires: - - contributor-pr - - driver-integration-tests-chrome-inject-document-domain: - context: test-runner:cypress-record-key - requires: - - contributor-pr - - driver-integration-tests-chrome-beta: - context: test-runner:cypress-record-key - requires: - - contributor-pr - - driver-integration-tests-chrome-beta-inject-document-domain: - context: test-runner:cypress-record-key - requires: - - contributor-pr - - driver-integration-tests-firefox: - context: test-runner:cypress-record-key - requires: - - contributor-pr - - driver-integration-tests-electron: - context: test-runner:cypress-record-key - requires: - - contributor-pr - - driver-integration-tests-webkit: - context: test-runner:cypress-record-key - requires: - - contributor-pr - - driver-integration-memory-tests: - requires: - - build - - run-frontend-shared-component-tests-chrome: - context: - [ - test-runner:cypress-record-key, - test-runner:launchpad-tests, - test-runner:percy - ] - percy: true - requires: - - contributor-pr - - run-launchpad-integration-tests-chrome: - context: - [ - test-runner:cypress-record-key, - test-runner:launchpad-tests, - test-runner:percy - ] - percy: true - requires: - - contributor-pr - - run-launchpad-component-tests-chrome: - context: - [ - test-runner:cypress-record-key, - test-runner:launchpad-tests, - test-runner:percy - ] - percy: true - requires: - - contributor-pr - - run-app-integration-tests-chrome: - context: - [ - test-runner:cypress-record-key, - test-runner:launchpad-tests, - test-runner:percy - ] - percy: true - requires: - - contributor-pr - - run-webpack-dev-server-integration-tests: - context: [ test-runner:cypress-record-key, test-runner:percy ] - requires: - - system-tests-node-modules-install - - run-vite-dev-server-integration-tests: - context: [ test-runner:cypress-record-key, test-runner:percy ] - requires: - - system-tests-node-modules-install - - run-app-component-tests-chrome: - context: - [ - test-runner:cypress-record-key, - test-runner:launchpad-tests, - test-runner:percy - ] - percy: true - requires: - - contributor-pr - - run-reporter-component-tests-chrome: - context: [ test-runner:cypress-record-key, test-runner:percy ] - percy: true - requires: - - contributor-pr - - reporter-integration-tests: - context: [ test-runner:cypress-record-key, test-runner:percy ] - requires: - - contributor-pr - - npm-webpack-dev-server: - requires: - - system-tests-node-modules-install - - npm-vite-dev-server: - requires: - - build - - npm-vite-plugin-cypress-esm: - requires: - - build - - npm-webpack-preprocessor: - requires: - - build - - npm-webpack-batteries-included-preprocessor: - requires: - - build - - npm-vue: - requires: - - build - - npm-puppeteer-unit-tests: - requires: - - build - - npm-puppeteer-cypress-tests: - requires: - - build - - npm-react: - requires: - - build - - npm-angular: - requires: - - build - - npm-mount-utils: - requires: - - build - - npm-grep: - requires: - - build - - npm-eslint-plugin-dev: - requires: - - build - - npm-cypress-schematic: - requires: - - build - - v8-integration-tests: - requires: - - system-tests-node-modules-install - - - ready-to-release: - requires: - - check-ts - - npm-angular - - npm-eslint-plugin-dev - - npm-puppeteer-unit-tests - - npm-puppeteer-cypress-tests - - npm-react - - npm-mount-utils - - npm-grep - - npm-vue - - npm-webpack-batteries-included-preprocessor - - npm-webpack-preprocessor - - npm-vite-dev-server - - npm-vite-plugin-cypress-esm - - npm-webpack-dev-server - - npm-cypress-schematic - - lint-types - - linux-lint - - percy-finalize - - driver-integration-tests-firefox - - driver-integration-tests-chrome - - driver-integration-tests-chrome-beta - - driver-integration-tests-electron - - driver-integration-tests-webkit - - driver-integration-memory-tests - - system-tests-non-root - - system-tests-firefox - - system-tests-electron - - system-tests-chrome - - system-tests-webkit - - server-performance-tests - - server-integration-tests - - server-unit-tests - - "test binary as a non-root user" - - "test binary as a root user" - - test-types-cypress-and-jest - - test-full-typescript-project - - test-binary-against-kitchensink - - test-npm-module-on-minimum-node-version - - binary-system-tests - - test-kitchensink - - unit-tests - - verify-release-readiness - - v8-integration-tests - - - npm-release: - context: test-runner:npm-release - requires: - - ready-to-release - - - create-and-trigger-packaging-artifacts: - context: [ test-runner:upload, test-runner:build-binary, publish-binary ] - requires: - - contributor-pr - - get-published-artifacts: - context: [ publish-binary, test-runner:commit-status-checks ] - requires: - - create-and-trigger-packaging-artifacts - # various testing scenarios, like building full binary - # and testing it on a real project - - test-against-staging: - context: test-runner:record-tests - <<: *mainBuildFilters - requires: - - build - - test-kitchensink: - requires: - - build - - test-kitchensink-against-staging: - executor: kitchensink-executor - context: test-runner:record-tests - <<: *mainBuildFilters - requires: - - build - - test-npm-module-on-minimum-node-version: - context: publish-binary - requires: - - get-published-artifacts - - test-types-cypress-and-jest: - context: publish-binary - requires: - - get-published-artifacts - - test-full-typescript-project: - context: publish-binary - requires: - - get-published-artifacts - - test-binary-against-kitchensink: - context: publish-binary - requires: - - get-published-artifacts - - test-npm-module-and-verify-binary: - <<: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-staging: - context: test-runner:record-tests - <<: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-kitchensink-chrome: - <<: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-recipes-firefox: - <<: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-recipes-chrome: - <<: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-recipes: - <<: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-kitchensink-firefox: - <<: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-todomvc-firefox: - <<: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-cypress-realworld-app: - context: test-runner:cypress-record-key - <<: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-as-specific-user: - name: "test binary as a non-root user" - executor: non-root-docker-user - context: publish-binary - requires: - - get-published-artifacts - - test-binary-as-specific-user: - name: "test binary as a root user" - context: publish-binary - requires: - - get-published-artifacts - - binary-system-tests: - context: publish-binary - requires: - - get-published-artifacts - - system-tests-node-modules-install - -linux-arm64-workflow: &linux-arm64-workflow - jobs: - - node_modules_install: - name: linux-arm64-node-modules-install - executor: linux-arm64 - resource_class: arm.medium - only-cache-for-root-user: true - - - build: - name: linux-arm64-build - context: test-runner:env-canary - executor: linux-arm64 - resource_class: arm.medium - requires: - - linux-arm64-node-modules-install - - - create-and-trigger-packaging-artifacts: - name: linux-arm64-create-and-trigger-packaging-artifacts - context: - [ - test-runner:upload, - test-runner:commit-status-checks, - test-runner:build-binary, - publish-binary - ] - executor: linux-arm64 - resource_class: arm.medium - requires: - - linux-arm64-node-modules-install - - - wait-for-binary-publish: - name: linux-arm64-wait-for-binary-publish - type: approval - requires: - - linux-arm64-create-and-trigger-packaging-artifacts - - - get-published-artifacts: - name: linux-arm64-get-published-artifacts - context: [ publish-binary, test-runner:commit-status-checks ] - executor: linux-arm64 - resource_class: arm.medium - requires: - - linux-arm64-wait-for-binary-publish - - - v8-integration-tests: - executor: linux-arm64 - resource_class: arm.medium - requires: - - linux-arm64-build - - driver-integration-memory-tests: - executor: linux-arm64 - resource_class: arm.medium - requires: - - linux-arm64-build - - server-unit-tests-cloud-environment: - executor: linux-arm64 - resource_class: arm.medium - requires: - - linux-arm64-build - -darwin-x64-workflow: &darwin-x64-workflow - jobs: - - node_modules_install: - name: darwin-x64-node-modules-install - executor: darwin-amd64 - resource_class: cypress-io/intel-macstadium - only-cache-for-root-user: true - - - build: - name: darwin-x64-build - context: test-runner:env-canary - executor: darwin-amd64 - resource_class: cypress-io/intel-macstadium - requires: - - darwin-x64-node-modules-install - - - create-build-artifacts: - name: darwin-x64-create-build-artifacts - context: - - test-runner:sign-mac-binary - - test-runner:upload - - test-runner:commit-status-checks - - test-runner:build-binary - executor: darwin-amd64 - resource_class: cypress-io/intel-macstadium - requires: - - darwin-x64-build - - - v8-integration-tests: - name: darwin-x64-v8-integration-tests - executor: darwin-amd64 - resource_class: cypress-io/intel-macstadium - requires: - - darwin-x64-build - - - driver-integration-memory-tests: - name: darwin-x64-driver-integration-memory-tests - executor: darwin-amd64 - resource_class: cypress-io/intel-macstadium - requires: - - darwin-x64-build - - - server-unit-tests-cloud-environment: - name: darwin-x64-driver-server-unit-tests-cloud-environment - executor: darwin-amd64 - resource_class: cypress-io/intel-macstadium - requires: - - darwin-x64-build - -darwin-arm64-workflow: &darwin-arm64-workflow - jobs: - - node_modules_install: - name: darwin-arm64-node-modules-install - executor: darwin-arm64 - resource_class: cypress-io/m1-macstadium - only-cache-for-root-user: true - - - build: - name: darwin-arm64-build - context: test-runner:env-canary - executor: darwin-arm64 - resource_class: cypress-io/m1-macstadium - requires: - - darwin-arm64-node-modules-install - - - create-build-artifacts: - name: darwin-arm64-create-build-artifacts - context: - - test-runner:sign-mac-binary - - test-runner:upload - - test-runner:commit-status-checks - - test-runner:build-binary - executor: darwin-arm64 - resource_class: cypress-io/m1-macstadium - requires: - - darwin-arm64-build - - - v8-integration-tests: - name: darwin-arm64-v8-integration-tests - executor: darwin-arm64 - resource_class: cypress-io/m1-macstadium - requires: - - darwin-arm64-build - - driver-integration-memory-tests: - name: darwin-arm64-driver-integration-memory-tests - executor: darwin-arm64 - resource_class: cypress-io/m1-macstadium - requires: - - darwin-arm64-build - - server-unit-tests-cloud-environment: - name: darwin-arm64-server-unit-tests-cloud-environment - executor: darwin-arm64 - resource_class: cypress-io/m1-macstadium - requires: - - darwin-arm64-build - -windows-workflow: &windows-workflow - jobs: - - node_modules_install: - name: windows-node-modules-install - executor: windows - resource_class: windows.medium - only-cache-for-root-user: true - - - build: - name: windows-build - context: test-runner:env-canary - executor: windows - resource_class: windows.large - requires: - - windows-node-modules-install - - - run-app-integration-tests-chrome: - name: windows-run-app-integration-tests-chrome - executor: windows - 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.large - context: [ test-runner:cypress-record-key, test-runner:launchpad-tests ] - requires: - - windows-build - - - unit-tests: - name: windows-unit-tests - executor: windows - resource_class: windows.medium - requires: - - windows-build - - - server-unit-tests-cloud-environment: - name: windows-server-unit-tests-cloud-environment - executor: windows - resource_class: windows.medium - requires: - - windows-build - - - create-build-artifacts: - name: windows-create-build-artifacts - executor: windows - resource_class: windows.large - context: - - test-runner:sign-windows-binary - - test-runner:upload - - test-runner:commit-status-checks - - test-runner:build-binary - requires: - - windows-build - - - test-binary-against-kitchensink-chrome: - name: windows-test-binary-against-kitchensink-chrome - executor: windows - requires: - - windows-create-build-artifacts - - - v8-integration-tests: - name: windows-v8-integration-tests - executor: windows - resource_class: windows.medium - requires: - - windows-build - - driver-integration-memory-tests: - name: windows-driver-integration-memory-tests - executor: windows - resource_class: windows.medium - requires: - - windows-build - + # we need to bootstrap the binary into our project directory and run the tests + source ./system-tests/scripts/bootstrap-docker-container.sh 'yarn cypress run' + name: Bootstrap the Cypress binary and run binary system test + working_directory: ~/cypress +orbs: + browser-tools: circleci/browser-tools@2.1.1 +version: 2.1 workflows: + darwin-arm64: + jobs: + - node_modules_install: + executor: darwin-arm64 + name: darwin-arm64-node-modules-install + only-cache-for-root-user: true + resource_class: cypress-io/m1-macstadium + - build: + context: test-runner:env-canary + executor: darwin-arm64 + name: darwin-arm64-build + requires: + - darwin-arm64-node-modules-install + resource_class: cypress-io/m1-macstadium + - create-build-artifacts: + context: + - test-runner:sign-mac-binary + - test-runner:upload + - test-runner:commit-status-checks + - test-runner:build-binary + executor: darwin-arm64 + name: darwin-arm64-create-build-artifacts + requires: + - darwin-arm64-build + resource_class: cypress-io/m1-macstadium + - v8-integration-tests: + executor: darwin-arm64 + name: darwin-arm64-v8-integration-tests + requires: + - darwin-arm64-build + resource_class: cypress-io/m1-macstadium + - driver-integration-memory-tests: + executor: darwin-arm64 + name: darwin-arm64-driver-integration-memory-tests + requires: + - darwin-arm64-build + resource_class: cypress-io/m1-macstadium + - server-unit-tests-cloud-environment: + executor: darwin-arm64 + name: darwin-arm64-server-unit-tests-cloud-environment + requires: + - darwin-arm64-build + resource_class: cypress-io/m1-macstadium + when: null + darwin-x64: + jobs: + - node_modules_install: + executor: darwin-amd64 + name: darwin-x64-node-modules-install + only-cache-for-root-user: true + resource_class: cypress-io/intel-macstadium + - build: + context: test-runner:env-canary + executor: darwin-amd64 + name: darwin-x64-build + requires: + - darwin-x64-node-modules-install + resource_class: cypress-io/intel-macstadium + - create-build-artifacts: + context: + - test-runner:sign-mac-binary + - test-runner:upload + - test-runner:commit-status-checks + - test-runner:build-binary + executor: darwin-amd64 + name: darwin-x64-create-build-artifacts + requires: + - darwin-x64-build + resource_class: cypress-io/intel-macstadium + - v8-integration-tests: + executor: darwin-amd64 + name: darwin-x64-v8-integration-tests + requires: + - darwin-x64-build + resource_class: cypress-io/intel-macstadium + - driver-integration-memory-tests: + executor: darwin-amd64 + name: darwin-x64-driver-integration-memory-tests + requires: + - darwin-x64-build + resource_class: cypress-io/intel-macstadium + - server-unit-tests-cloud-environment: + executor: darwin-amd64 + name: darwin-x64-driver-server-unit-tests-cloud-environment + requires: + - darwin-x64-build + resource_class: cypress-io/intel-macstadium + when: + or: + - equal: + - develop + - << pipeline.git.branch >> + - equal: + - update-v8-snapshot-cache-on-develop + - << pipeline.git.branch >> + - equal: + - chore/migrate-electron-lib-ts + - << pipeline.git.branch >> + - matches: + pattern: /^release\/\d+\.\d+\.\d+$/ + value: << pipeline.git.branch >> + linux-arm64: + jobs: + - node_modules_install: + executor: linux-arm64 + name: linux-arm64-node-modules-install + only-cache-for-root-user: true + resource_class: arm.medium + - build: + context: test-runner:env-canary + executor: linux-arm64 + name: linux-arm64-build + requires: + - linux-arm64-node-modules-install + resource_class: arm.medium + - create-and-trigger-packaging-artifacts: + context: + - test-runner:upload + - test-runner:commit-status-checks + - test-runner:build-binary + - publish-binary + executor: linux-arm64 + name: linux-arm64-create-and-trigger-packaging-artifacts + requires: + - linux-arm64-node-modules-install + resource_class: arm.medium + - wait-for-binary-publish: + name: linux-arm64-wait-for-binary-publish + requires: + - linux-arm64-create-and-trigger-packaging-artifacts + type: approval + - get-published-artifacts: + context: + - publish-binary + - test-runner:commit-status-checks + executor: linux-arm64 + name: linux-arm64-get-published-artifacts + requires: + - linux-arm64-wait-for-binary-publish + resource_class: arm.medium + - v8-integration-tests: + executor: linux-arm64 + requires: + - linux-arm64-build + resource_class: arm.medium + - driver-integration-memory-tests: + executor: linux-arm64 + requires: + - linux-arm64-build + resource_class: arm.medium + - server-unit-tests-cloud-environment: + executor: linux-arm64 + requires: + - linux-arm64-build + resource_class: arm.medium + when: null linux-x64: - <<: [ *linux-x64-workflow, *linux-x64-workflow-exclude-filters ] + jobs: + - node_modules_install: + build-better-sqlite3: true + - build: + context: test-runner:env-canary + requires: + - node_modules_install + - check-ts: + requires: + - build + - lint: + name: linux-lint + requires: + - build + - percy-finalize: + context: test-runner:percy + required_env_var: PERCY_TOKEN + requires: + - cli-visual-tests + - reporter-integration-tests + - run-app-component-tests-chrome + - run-app-integration-tests-chrome + - run-frontend-shared-component-tests-chrome + - run-launchpad-component-tests-chrome + - run-launchpad-integration-tests-chrome + - run-reporter-component-tests-chrome + - run-webpack-dev-server-integration-tests + - run-vite-dev-server-integration-tests + - verify-accessibility-results: + context: test-runner:cypress-record-key + requires: + - reporter-integration-tests + - run-app-component-tests-chrome + - run-app-integration-tests-chrome + - run-frontend-shared-component-tests-chrome + - run-launchpad-component-tests-chrome + - run-launchpad-integration-tests-chrome + - run-reporter-component-tests-chrome + - run-webpack-dev-server-integration-tests + - run-vite-dev-server-integration-tests + - driver-integration-tests-firefox + - driver-integration-tests-chrome + - driver-integration-tests-chrome-inject-document-domain + - driver-integration-tests-chrome-beta-inject-document-domain + - driver-integration-tests-electron + - driver-integration-tests-webkit + - driver-integration-memory-tests + - lint-types: + requires: + - build + - cli-visual-tests: + context: test-runner:percy + requires: + - build + - unit-tests: + requires: + - build + - verify-release-readiness: + context: test-runner:npm-release + requires: + - build + - server-unit-tests: + requires: + - build + - server-integration-tests: + requires: + - build + - server-performance-tests: + requires: + - build + - system-tests-node-modules-install: + context: test-runner:performance-tracking + requires: + - build + - system-tests-chrome: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-electron: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-firefox: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-webkit: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-non-root: + context: test-runner:performance-tracking + executor: non-root-docker-user + requires: + - system-tests-node-modules-install + - driver-integration-tests-chrome: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-chrome-inject-document-domain: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-chrome-beta: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-chrome-beta-inject-document-domain: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-firefox: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-electron: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-webkit: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-memory-tests: + requires: + - build + - run-frontend-shared-component-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + - test-runner:percy + percy: true + requires: + - build + - run-launchpad-integration-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + - test-runner:percy + percy: true + requires: + - build + - run-launchpad-component-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + - test-runner:percy + percy: true + requires: + - build + - run-app-integration-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + - test-runner:percy + percy: true + requires: + - build + - run-webpack-dev-server-integration-tests: + context: + - test-runner:cypress-record-key + - test-runner:percy + requires: + - system-tests-node-modules-install + - run-vite-dev-server-integration-tests: + context: + - test-runner:cypress-record-key + - test-runner:percy + requires: + - system-tests-node-modules-install + - run-app-component-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + - test-runner:percy + percy: true + requires: + - build + - run-reporter-component-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:percy + percy: true + requires: + - build + - reporter-integration-tests: + context: + - test-runner:cypress-record-key + - test-runner:percy + requires: + - build + - npm-webpack-dev-server: + requires: + - system-tests-node-modules-install + - npm-vite-dev-server: + requires: + - build + - npm-vite-plugin-cypress-esm: + requires: + - build + - npm-webpack-preprocessor: + requires: + - build + - npm-webpack-batteries-included-preprocessor: + requires: + - build + - npm-vue: + requires: + - build + - npm-puppeteer-unit-tests: + requires: + - build + - npm-puppeteer-cypress-tests: + requires: + - build + - npm-react: + requires: + - build + - npm-angular: + requires: + - build + - npm-mount-utils: + requires: + - build + - npm-grep: + requires: + - build + - npm-eslint-plugin-dev: + requires: + - build + - npm-cypress-schematic: + requires: + - build + - v8-integration-tests: + requires: + - system-tests-node-modules-install + - ready-to-release: + requires: + - check-ts + - npm-angular + - npm-eslint-plugin-dev + - npm-puppeteer-unit-tests + - npm-puppeteer-cypress-tests + - npm-react + - npm-mount-utils + - npm-grep + - npm-vue + - npm-webpack-batteries-included-preprocessor + - npm-webpack-preprocessor + - npm-vite-dev-server + - npm-vite-plugin-cypress-esm + - npm-webpack-dev-server + - npm-cypress-schematic + - lint-types + - linux-lint + - percy-finalize + - driver-integration-tests-firefox + - driver-integration-tests-chrome + - driver-integration-tests-chrome-beta + - driver-integration-tests-chrome-inject-document-domain + - driver-integration-tests-chrome-beta-inject-document-domain + - driver-integration-tests-electron + - driver-integration-tests-webkit + - driver-integration-memory-tests + - system-tests-non-root + - system-tests-firefox + - system-tests-electron + - system-tests-chrome + - system-tests-webkit + - server-performance-tests + - server-integration-tests + - server-unit-tests + - test binary as a non-root user + - test binary as a root user + - test-types-cypress-and-jest + - test-full-typescript-project + - test-binary-against-kitchensink + - test-npm-module-on-minimum-node-version + - binary-system-tests + - yarn-pnp-preprocessor-system-test + - svelte-webpack-system-test + - test-kitchensink + - unit-tests + - verify-release-readiness + - v8-integration-tests + - npm-release: + context: test-runner:npm-release + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - ready-to-release + - create-and-trigger-packaging-artifacts: + context: + - test-runner:upload + - test-runner:build-binary + - publish-binary + requires: + - node_modules_install + - wait-for-binary-publish: + requires: + - create-and-trigger-packaging-artifacts + type: approval + - get-published-artifacts: + context: + - publish-binary + - test-runner:commit-status-checks + requires: + - wait-for-binary-publish + - test-against-staging: + context: test-runner:record-tests + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - build + - test-kitchensink: + requires: + - build + - test-kitchensink-against-staging: + context: test-runner:record-tests + executor: kitchensink-executor + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - build + - test-npm-module-on-minimum-node-version: + context: publish-binary + requires: + - get-published-artifacts + - test-types-cypress-and-jest: + context: publish-binary + requires: + - get-published-artifacts + - test-full-typescript-project: + context: publish-binary + requires: + - get-published-artifacts + - test-binary-against-kitchensink: + context: publish-binary + requires: + - get-published-artifacts + - test-npm-module-and-verify-binary: + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - get-published-artifacts + - test-binary-against-staging: + context: test-runner:record-tests + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - get-published-artifacts + - test-binary-against-kitchensink-chrome: + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - get-published-artifacts + - test-binary-against-recipes-firefox: + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - get-published-artifacts + - test-binary-against-recipes-chrome: + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - get-published-artifacts + - test-binary-against-recipes: + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - get-published-artifacts + - test-binary-against-kitchensink-firefox: + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - get-published-artifacts + - test-binary-against-todomvc-firefox: + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - get-published-artifacts + - test-binary-against-cypress-realworld-app: + context: test-runner:cypress-record-key + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - get-published-artifacts + - test-binary-as-specific-user: + context: publish-binary + executor: non-root-docker-user + name: test binary as a non-root user + requires: + - get-published-artifacts + - test-binary-as-specific-user: + context: publish-binary + name: test binary as a root user + requires: + - get-published-artifacts + - binary-system-tests: + context: publish-binary + requires: + - get-published-artifacts + - system-tests-node-modules-install + - yarn-pnp-preprocessor-system-test: + context: publish-binary + requires: + - get-published-artifacts + - system-tests-node-modules-install + - svelte-webpack-system-test: + context: publish-binary + requires: + - get-published-artifacts + - system-tests-node-modules-install + when: + - equal: + - develop + - << pipeline.git.branch >> + - equal: + - update-v8-snapshot-cache-on-develop + - << pipeline.git.branch >> + - matches: + pattern: /^release\/\d+\.\d+\.\d+$/ + value: << pipeline.git.branch >> linux-x64-contributor: - <<: *linux-x64-contributor-workflow + jobs: + - node_modules_install + - build: + is_contributor_pr: true + requires: + - node_modules_install + - contributor-pr: + requires: + - build + type: approval + - verify-accessibility-results + - check-ts: + requires: + - build + - lint: + name: linux-lint + requires: + - build + - percy-finalize: + context: test-runner:percy + required_env_var: PERCY_TOKEN + requires: + - cli-visual-tests + - reporter-integration-tests + - run-app-component-tests-chrome + - run-app-integration-tests-chrome + - run-frontend-shared-component-tests-chrome + - run-launchpad-component-tests-chrome + - run-launchpad-integration-tests-chrome + - run-reporter-component-tests-chrome + - run-webpack-dev-server-integration-tests + - run-vite-dev-server-integration-tests + - lint-types: + requires: + - build + - cli-visual-tests: + context: test-runner:percy + requires: + - contributor-pr + - unit-tests: + requires: + - build + - verify-release-readiness: + context: test-runner:npm-release + requires: + - contributor-pr + - server-unit-tests: + requires: + - build + - server-integration-tests: + requires: + - build + - server-performance-tests: + requires: + - build + - system-tests-node-modules-install: + context: test-runner:performance-tracking + requires: + - contributor-pr + - system-tests-chrome: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-electron: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-firefox: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-webkit: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-non-root: + context: test-runner:performance-tracking + executor: non-root-docker-user + requires: + - system-tests-node-modules-install + - driver-integration-tests-chrome: + context: test-runner:cypress-record-key + requires: + - contributor-pr + - driver-integration-tests-chrome-inject-document-domain: + context: test-runner:cypress-record-key + requires: + - contributor-pr + - driver-integration-tests-chrome-beta: + context: test-runner:cypress-record-key + requires: + - contributor-pr + - driver-integration-tests-chrome-beta-inject-document-domain: + context: test-runner:cypress-record-key + requires: + - contributor-pr + - driver-integration-tests-firefox: + context: test-runner:cypress-record-key + requires: + - contributor-pr + - driver-integration-tests-electron: + context: test-runner:cypress-record-key + requires: + - contributor-pr + - driver-integration-tests-webkit: + context: test-runner:cypress-record-key + requires: + - contributor-pr + - driver-integration-memory-tests: + requires: + - build + - run-frontend-shared-component-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + - test-runner:percy + percy: true + requires: + - contributor-pr + - run-launchpad-integration-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + - test-runner:percy + percy: true + requires: + - contributor-pr + - run-launchpad-component-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + - test-runner:percy + percy: true + requires: + - contributor-pr + - run-app-integration-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + - test-runner:percy + percy: true + requires: + - contributor-pr + - run-webpack-dev-server-integration-tests: + context: + - test-runner:cypress-record-key + - test-runner:percy + requires: + - system-tests-node-modules-install + - run-vite-dev-server-integration-tests: + context: + - test-runner:cypress-record-key + - test-runner:percy + requires: + - system-tests-node-modules-install + - run-app-component-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + - test-runner:percy + percy: true + requires: + - contributor-pr + - run-reporter-component-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:percy + percy: true + requires: + - contributor-pr + - reporter-integration-tests: + context: + - test-runner:cypress-record-key + - test-runner:percy + requires: + - contributor-pr + - npm-webpack-dev-server: + requires: + - system-tests-node-modules-install + - npm-vite-dev-server: + requires: + - build + - npm-vite-plugin-cypress-esm: + requires: + - build + - npm-webpack-preprocessor: + requires: + - build + - npm-webpack-batteries-included-preprocessor: + requires: + - build + - npm-vue: + requires: + - build + - npm-puppeteer-unit-tests: + requires: + - build + - npm-puppeteer-cypress-tests: + requires: + - build + - npm-react: + requires: + - build + - npm-angular: + requires: + - build + - npm-mount-utils: + requires: + - build + - npm-grep: + requires: + - build + - npm-eslint-plugin-dev: + requires: + - build + - npm-cypress-schematic: + requires: + - build + - v8-integration-tests: + requires: + - system-tests-node-modules-install + - ready-to-release: + requires: + - check-ts + - npm-angular + - npm-eslint-plugin-dev + - npm-puppeteer-unit-tests + - npm-puppeteer-cypress-tests + - npm-react + - npm-mount-utils + - npm-grep + - npm-vue + - npm-webpack-batteries-included-preprocessor + - npm-webpack-preprocessor + - npm-vite-dev-server + - npm-vite-plugin-cypress-esm + - npm-webpack-dev-server + - npm-cypress-schematic + - lint-types + - linux-lint + - percy-finalize + - driver-integration-tests-firefox + - driver-integration-tests-chrome + - driver-integration-tests-chrome-beta + - driver-integration-tests-electron + - driver-integration-tests-webkit + - driver-integration-memory-tests + - system-tests-non-root + - system-tests-firefox + - system-tests-electron + - system-tests-chrome + - system-tests-webkit + - server-performance-tests + - server-integration-tests + - server-unit-tests + - test binary as a non-root user + - test binary as a root user + - test-types-cypress-and-jest + - test-full-typescript-project + - test-binary-against-kitchensink + - test-npm-module-on-minimum-node-version + - binary-system-tests + - test-kitchensink + - unit-tests + - verify-release-readiness + - v8-integration-tests + - npm-release: + context: test-runner:npm-release + requires: + - ready-to-release + - create-and-trigger-packaging-artifacts: + context: + - test-runner:upload + - test-runner:build-binary + - publish-binary + requires: + - contributor-pr + - get-published-artifacts: + context: + - publish-binary + - test-runner:commit-status-checks + requires: + - create-and-trigger-packaging-artifacts + - test-against-staging: + context: test-runner:record-tests + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - build + - test-kitchensink: + requires: + - build + - test-kitchensink-against-staging: + context: test-runner:record-tests + executor: kitchensink-executor + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - build + - test-npm-module-on-minimum-node-version: + context: publish-binary + requires: + - get-published-artifacts + - test-types-cypress-and-jest: + context: publish-binary + requires: + - get-published-artifacts + - test-full-typescript-project: + context: publish-binary + requires: + - get-published-artifacts + - test-binary-against-kitchensink: + context: publish-binary + requires: + - get-published-artifacts + - test-npm-module-and-verify-binary: + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - get-published-artifacts + - test-binary-against-staging: + context: test-runner:record-tests + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - get-published-artifacts + - test-binary-against-kitchensink-chrome: + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - get-published-artifacts + - test-binary-against-recipes-firefox: + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - get-published-artifacts + - test-binary-against-recipes-chrome: + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - get-published-artifacts + - test-binary-against-recipes: + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - get-published-artifacts + - test-binary-against-kitchensink-firefox: + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - get-published-artifacts + - test-binary-against-todomvc-firefox: + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - get-published-artifacts + - test-binary-against-cypress-realworld-app: + context: test-runner:cypress-record-key + filters: + branches: + only: + - develop + - /^release\/\d+\.\d+\.\d+$/ + - update-v8-snapshot-cache-on-develop + - chore/refactor_cli_to_ts + requires: + - get-published-artifacts + - test-binary-as-specific-user: + context: publish-binary + executor: non-root-docker-user + name: test binary as a non-root user + requires: + - get-published-artifacts + - test-binary-as-specific-user: + context: publish-binary + name: test binary as a root user + requires: + - get-published-artifacts + - binary-system-tests: + context: publish-binary + requires: + - get-published-artifacts + - system-tests-node-modules-install when: matches: pattern: /^pull\/[0-9]+/ value: << pipeline.git.branch >> - linux-arm64: - <<: [ *linux-arm64-workflow, *linux-arm64-workflow-filters ] - darwin-x64: - <<: [ *darwin-x64-workflow, *darwin-workflow-filters ] - darwin-arm64: - <<: [ *darwin-arm64-workflow, *darwin-workflow-filters ] + pull-request: + pull-request: + jobs: + - node_modules_install: + build-better-sqlite3: true + - build: + context: test-runner:env-canary + requires: + - node_modules_install + - check-ts: + requires: + - build + - lint: + name: linux-lint + requires: + - build + - percy-finalize: + context: test-runner:percy + required_env_var: PERCY_TOKEN + requires: + - cli-visual-tests + - reporter-integration-tests + - run-app-component-tests-chrome + - run-app-integration-tests-chrome + - run-frontend-shared-component-tests-chrome + - run-launchpad-component-tests-chrome + - run-launchpad-integration-tests-chrome + - run-reporter-component-tests-chrome + - run-webpack-dev-server-integration-tests + - run-vite-dev-server-integration-tests + - verify-accessibility-results: + context: test-runner:cypress-record-key + requires: + - reporter-integration-tests + - run-app-component-tests-chrome + - run-app-integration-tests-chrome + - run-frontend-shared-component-tests-chrome + - run-launchpad-component-tests-chrome + - run-launchpad-integration-tests-chrome + - run-reporter-component-tests-chrome + - run-webpack-dev-server-integration-tests + - run-vite-dev-server-integration-tests + - driver-integration-tests-firefox + - driver-integration-tests-chrome + - driver-integration-tests-chrome-inject-document-domain + - driver-integration-tests-chrome-beta-inject-document-domain + - driver-integration-tests-electron + - driver-integration-tests-webkit + - driver-integration-memory-tests + - lint-types: + requires: + - build + - cli-visual-tests: + context: test-runner:percy + requires: + - build + - unit-tests: + requires: + - build + - verify-release-readiness: + context: test-runner:npm-release + requires: + - build + - server-unit-tests: + requires: + - build + - server-integration-tests: + requires: + - build + - server-performance-tests: + requires: + - build + - system-tests-node-modules-install: + context: test-runner:performance-tracking + requires: + - build + - system-tests-chrome: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-electron: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-firefox: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-webkit: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-non-root: + context: test-runner:performance-tracking + executor: non-root-docker-user + requires: + - system-tests-node-modules-install + - driver-integration-tests-chrome: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-chrome-inject-document-domain: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-chrome-beta: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-chrome-beta-inject-document-domain: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-firefox: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-electron: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-webkit: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-memory-tests: + requires: + - build + - run-frontend-shared-component-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + - test-runner:percy + percy: true + requires: + - build + - run-launchpad-integration-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + - test-runner:percy + percy: true + requires: + - build + - run-launchpad-component-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + - test-runner:percy + percy: true + requires: + - build + - run-app-integration-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + - test-runner:percy + percy: true + requires: + - build + - run-webpack-dev-server-integration-tests: + context: + - test-runner:cypress-record-key + - test-runner:percy + requires: + - system-tests-node-modules-install + - run-vite-dev-server-integration-tests: + context: + - test-runner:cypress-record-key + - test-runner:percy + requires: + - system-tests-node-modules-install + - run-app-component-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + - test-runner:percy + percy: true + requires: + - build + - run-reporter-component-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:percy + percy: true + requires: + - build + - reporter-integration-tests: + context: + - test-runner:cypress-record-key + - test-runner:percy + requires: + - build + - npm-webpack-dev-server: + requires: + - system-tests-node-modules-install + - npm-vite-dev-server: + requires: + - build + - npm-vite-plugin-cypress-esm: + requires: + - build + - npm-webpack-preprocessor: + requires: + - build + - npm-webpack-batteries-included-preprocessor: + requires: + - build + - npm-vue: + requires: + - build + - npm-puppeteer-unit-tests: + requires: + - build + - npm-puppeteer-cypress-tests: + requires: + - build + - npm-react: + requires: + - build + - npm-angular: + requires: + - build + - npm-mount-utils: + requires: + - build + - npm-grep: + requires: + - build + - npm-eslint-plugin-dev: + requires: + - build + - npm-cypress-schematic: + requires: + - build + - v8-integration-tests: + requires: + - system-tests-node-modules-install + - create-and-trigger-packaging-artifacts: + context: + - test-runner:upload + - test-runner:build-binary + - publish-binary + requires: + - node_modules_install + - wait-for-binary-publish: + requires: + - create-and-trigger-packaging-artifacts + type: approval + - get-published-artifacts: + context: + - publish-binary + - test-runner:commit-status-checks + requires: + - wait-for-binary-publish + - test-kitchensink: + requires: + - build + - test-kitchensink-against-staging: null + - test-npm-module-on-minimum-node-version: + context: publish-binary + requires: + - get-published-artifacts + - test-types-cypress-and-jest: + context: publish-binary + requires: + - get-published-artifacts + - test-full-typescript-project: + context: publish-binary + requires: + - get-published-artifacts + - test-binary-against-kitchensink: + context: publish-binary + requires: + - get-published-artifacts + - test-binary-as-specific-user: + context: publish-binary + executor: non-root-docker-user + name: test binary as a non-root user + requires: + - get-published-artifacts + - test-binary-as-specific-user: + context: publish-binary + name: test binary as a root user + requires: + - get-published-artifacts + - binary-system-tests: + context: publish-binary + requires: + - get-published-artifacts + - system-tests-node-modules-install + - yarn-pnp-preprocessor-system-test: + context: publish-binary + requires: + - get-published-artifacts + - system-tests-node-modules-install + - svelte-webpack-system-test: + context: publish-binary + requires: + - get-published-artifacts + - system-tests-node-modules-install + when: + - matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> windows: - <<: [ *windows-workflow, *windows-workflow-filters ] + jobs: + - node_modules_install: + executor: windows + name: windows-node-modules-install + only-cache-for-root-user: true + resource_class: windows.medium + - build: + context: test-runner:env-canary + executor: windows + name: windows-build + requires: + - windows-node-modules-install + resource_class: windows.large + - run-app-integration-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + executor: windows + name: windows-run-app-integration-tests-chrome + requires: + - windows-build + resource_class: windows.large + - run-launchpad-integration-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + executor: windows + name: windows-run-launchpad-integration-tests-chrome + requires: + - windows-build + resource_class: windows.large + - unit-tests: + executor: windows + name: windows-unit-tests + requires: + - windows-build + resource_class: windows.medium + - server-unit-tests-cloud-environment: + executor: windows + name: windows-server-unit-tests-cloud-environment + requires: + - windows-build + resource_class: windows.medium + - create-build-artifacts: + context: + - test-runner:sign-windows-binary + - test-runner:upload + - test-runner:commit-status-checks + - test-runner:build-binary + executor: windows + name: windows-create-build-artifacts + requires: + - windows-build + resource_class: windows.large + - test-binary-against-kitchensink-chrome: + executor: windows + name: windows-test-binary-against-kitchensink-chrome + requires: + - windows-create-build-artifacts + - v8-integration-tests: + executor: windows + name: windows-v8-integration-tests + requires: + - windows-build + resource_class: windows.medium + - driver-integration-memory-tests: + executor: windows + name: windows-driver-integration-memory-tests + requires: + - windows-build + resource_class: windows.medium + when: null From d7dd5042c2e8d57f57d7851ffd2d7b80b7935a2d Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Wed, 10 Sep 2025 11:17:22 -0400 Subject: [PATCH 04/26] fix pull request workflow def --- .../workflows-src/workflows/pull-request.yml | 616 +++++++++--------- .circleci/workflows.yml | 607 +++++++++-------- 2 files changed, 611 insertions(+), 612 deletions(-) diff --git a/.circleci/workflows-src/workflows/pull-request.yml b/.circleci/workflows-src/workflows/pull-request.yml index d3dbb6d5592..ebf29f2a758 100644 --- a/.circleci/workflows-src/workflows/pull-request.yml +++ b/.circleci/workflows-src/workflows/pull-request.yml @@ -1,310 +1,310 @@ -pull-request: - when: - - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> - jobs: - - node_modules_install: - build-better-sqlite3: true - - build: - context: test-runner:env-canary - requires: - - node_modules_install - - check-ts: - requires: - - build - - lint: - name: linux-lint - requires: - - build - - percy-finalize: - context: test-runner:percy - required_env_var: PERCY_TOKEN - requires: - - cli-visual-tests - - reporter-integration-tests - - run-app-component-tests-chrome - - run-app-integration-tests-chrome - - run-frontend-shared-component-tests-chrome - - run-launchpad-component-tests-chrome - - run-launchpad-integration-tests-chrome - - run-reporter-component-tests-chrome - - run-webpack-dev-server-integration-tests - - run-vite-dev-server-integration-tests - # Cypress run must be completed to fetch Accessibility report - - verify-accessibility-results: - context: test-runner:cypress-record-key - requires: - - reporter-integration-tests - - run-app-component-tests-chrome - - run-app-integration-tests-chrome - - run-frontend-shared-component-tests-chrome - - run-launchpad-component-tests-chrome - - run-launchpad-integration-tests-chrome - - run-reporter-component-tests-chrome - - run-webpack-dev-server-integration-tests - - run-vite-dev-server-integration-tests - - driver-integration-tests-firefox - - driver-integration-tests-chrome - - driver-integration-tests-chrome-inject-document-domain - - driver-integration-tests-chrome-beta-inject-document-domain - - driver-integration-tests-electron - - driver-integration-tests-webkit - - driver-integration-memory-tests - - lint-types: - requires: - - build - # unit, integration and e2e tests - - cli-visual-tests: - context: test-runner:percy - requires: - - build - - unit-tests: - requires: - - build - - verify-release-readiness: - context: test-runner:npm-release - requires: - - build - - server-unit-tests: - requires: - - build - - server-integration-tests: - requires: - - build - - server-performance-tests: - requires: - - build - - system-tests-node-modules-install: - context: test-runner:performance-tracking - requires: - - build - - system-tests-chrome: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-electron: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-firefox: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-webkit: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-non-root: - context: test-runner:performance-tracking - executor: non-root-docker-user - requires: - - system-tests-node-modules-install - - driver-integration-tests-chrome: - context: test-runner:cypress-record-key - requires: - - build - - driver-integration-tests-chrome-inject-document-domain: - context: test-runner:cypress-record-key - requires: - - build - - driver-integration-tests-chrome-beta: - context: test-runner:cypress-record-key - requires: - - build - - driver-integration-tests-chrome-beta-inject-document-domain: - context: test-runner:cypress-record-key - requires: - - build - - driver-integration-tests-firefox: - context: test-runner:cypress-record-key - requires: - - build - - driver-integration-tests-electron: - context: test-runner:cypress-record-key - requires: - - build - - driver-integration-tests-webkit: - context: test-runner:cypress-record-key - requires: - - build - - driver-integration-memory-tests: - requires: - - build - - run-frontend-shared-component-tests-chrome: - context: - [ - test-runner:cypress-record-key, - test-runner:launchpad-tests, - test-runner:percy - ] - percy: true - requires: - - build - - run-launchpad-integration-tests-chrome: - context: - [ - test-runner:cypress-record-key, - test-runner:launchpad-tests, - test-runner:percy - ] - percy: true - requires: - - build - - run-launchpad-component-tests-chrome: - context: - [ - test-runner:cypress-record-key, - test-runner:launchpad-tests, - test-runner:percy - ] - percy: true - requires: - - build - - run-app-integration-tests-chrome: - context: - [ - test-runner:cypress-record-key, - test-runner:launchpad-tests, - test-runner:percy - ] - percy: true - requires: - - build - - run-webpack-dev-server-integration-tests: - context: [ test-runner:cypress-record-key, test-runner:percy ] - requires: - - system-tests-node-modules-install - - run-vite-dev-server-integration-tests: - context: [ test-runner:cypress-record-key, test-runner:percy ] - requires: - - system-tests-node-modules-install - - run-app-component-tests-chrome: - context: - [ - test-runner:cypress-record-key, - test-runner:launchpad-tests, - test-runner:percy - ] - percy: true - requires: - - build - - run-reporter-component-tests-chrome: - context: [ test-runner:cypress-record-key, test-runner:percy ] - percy: true - requires: - - build - - reporter-integration-tests: - context: [ test-runner:cypress-record-key, test-runner:percy ] - requires: - - build - - npm-webpack-dev-server: - requires: - - system-tests-node-modules-install - - npm-vite-dev-server: - requires: - - build - - npm-vite-plugin-cypress-esm: - requires: - - build - - npm-webpack-preprocessor: - requires: - - build - - npm-webpack-batteries-included-preprocessor: - requires: - - build - - npm-vue: - requires: - - build - - npm-puppeteer-unit-tests: - requires: - - build - - npm-puppeteer-cypress-tests: - requires: - - build - - npm-react: - requires: - - build - - npm-angular: - requires: - - build - - npm-mount-utils: - requires: - - build - - npm-grep: - requires: - - build - - npm-eslint-plugin-dev: - requires: - - build - - npm-cypress-schematic: - requires: - - build - - v8-integration-tests: - requires: - - system-tests-node-modules-install +when: + - matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> - - create-and-trigger-packaging-artifacts: - context: - - test-runner:upload - - test-runner:build-binary - - publish-binary - requires: - - node_modules_install - - wait-for-binary-publish: - type: approval - requires: - - create-and-trigger-packaging-artifacts - - get-published-artifacts: - context: - - publish-binary - - test-runner:commit-status-checks - requires: - - wait-for-binary-publish - - test-kitchensink: - requires: - - build - - test-kitchensink-against-staging: - - test-npm-module-on-minimum-node-version: - context: publish-binary - requires: - - get-published-artifacts - - test-types-cypress-and-jest: - context: publish-binary - requires: - - get-published-artifacts - - test-full-typescript-project: - context: publish-binary - requires: - - get-published-artifacts - - test-binary-against-kitchensink: - context: publish-binary - requires: - - get-published-artifacts - - test-binary-as-specific-user: - name: "test binary as a non-root user" - executor: non-root-docker-user - context: publish-binary - requires: - - get-published-artifacts - - test-binary-as-specific-user: - name: "test binary as a root user" - context: publish-binary - requires: - - get-published-artifacts - - binary-system-tests: - context: publish-binary - requires: - - get-published-artifacts - - system-tests-node-modules-install - - yarn-pnp-preprocessor-system-test: - context: publish-binary - requires: - - get-published-artifacts - - system-tests-node-modules-install - - svelte-webpack-system-test: - context: publish-binary - requires: - - get-published-artifacts - - system-tests-node-modules-install +jobs: + - node_modules_install: + build-better-sqlite3: true + - build: + context: test-runner:env-canary + requires: + - node_modules_install + - check-ts: + requires: + - build + - lint: + name: linux-lint + requires: + - build + - percy-finalize: + context: test-runner:percy + required_env_var: PERCY_TOKEN + requires: + - cli-visual-tests + - reporter-integration-tests + - run-app-component-tests-chrome + - run-app-integration-tests-chrome + - run-frontend-shared-component-tests-chrome + - run-launchpad-component-tests-chrome + - run-launchpad-integration-tests-chrome + - run-reporter-component-tests-chrome + - run-webpack-dev-server-integration-tests + - run-vite-dev-server-integration-tests + # Cypress run must be completed to fetch Accessibility report + - verify-accessibility-results: + context: test-runner:cypress-record-key + requires: + - reporter-integration-tests + - run-app-component-tests-chrome + - run-app-integration-tests-chrome + - run-frontend-shared-component-tests-chrome + - run-launchpad-component-tests-chrome + - run-launchpad-integration-tests-chrome + - run-reporter-component-tests-chrome + - run-webpack-dev-server-integration-tests + - run-vite-dev-server-integration-tests + - driver-integration-tests-firefox + - driver-integration-tests-chrome + - driver-integration-tests-chrome-inject-document-domain + - driver-integration-tests-chrome-beta-inject-document-domain + - driver-integration-tests-electron + - driver-integration-tests-webkit + - driver-integration-memory-tests + - lint-types: + requires: + - build + # unit, integration and e2e tests + - cli-visual-tests: + context: test-runner:percy + requires: + - build + - unit-tests: + requires: + - build + - verify-release-readiness: + context: test-runner:npm-release + requires: + - build + - server-unit-tests: + requires: + - build + - server-integration-tests: + requires: + - build + - server-performance-tests: + requires: + - build + - system-tests-node-modules-install: + context: test-runner:performance-tracking + requires: + - build + - system-tests-chrome: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-electron: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-firefox: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-webkit: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-non-root: + context: test-runner:performance-tracking + executor: non-root-docker-user + requires: + - system-tests-node-modules-install + - driver-integration-tests-chrome: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-chrome-inject-document-domain: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-chrome-beta: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-chrome-beta-inject-document-domain: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-firefox: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-electron: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-webkit: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-memory-tests: + requires: + - build + - run-frontend-shared-component-tests-chrome: + context: + [ + test-runner:cypress-record-key, + test-runner:launchpad-tests, + test-runner:percy + ] + percy: true + requires: + - build + - run-launchpad-integration-tests-chrome: + context: + [ + test-runner:cypress-record-key, + test-runner:launchpad-tests, + test-runner:percy + ] + percy: true + requires: + - build + - run-launchpad-component-tests-chrome: + context: + [ + test-runner:cypress-record-key, + test-runner:launchpad-tests, + test-runner:percy + ] + percy: true + requires: + - build + - run-app-integration-tests-chrome: + context: + [ + test-runner:cypress-record-key, + test-runner:launchpad-tests, + test-runner:percy + ] + percy: true + requires: + - build + - run-webpack-dev-server-integration-tests: + context: [ test-runner:cypress-record-key, test-runner:percy ] + requires: + - system-tests-node-modules-install + - run-vite-dev-server-integration-tests: + context: [ test-runner:cypress-record-key, test-runner:percy ] + requires: + - system-tests-node-modules-install + - run-app-component-tests-chrome: + context: + [ + test-runner:cypress-record-key, + test-runner:launchpad-tests, + test-runner:percy + ] + percy: true + requires: + - build + - run-reporter-component-tests-chrome: + context: [ test-runner:cypress-record-key, test-runner:percy ] + percy: true + requires: + - build + - reporter-integration-tests: + context: [ test-runner:cypress-record-key, test-runner:percy ] + requires: + - build + - npm-webpack-dev-server: + requires: + - system-tests-node-modules-install + - npm-vite-dev-server: + requires: + - build + - npm-vite-plugin-cypress-esm: + requires: + - build + - npm-webpack-preprocessor: + requires: + - build + - npm-webpack-batteries-included-preprocessor: + requires: + - build + - npm-vue: + requires: + - build + - npm-puppeteer-unit-tests: + requires: + - build + - npm-puppeteer-cypress-tests: + requires: + - build + - npm-react: + requires: + - build + - npm-angular: + requires: + - build + - npm-mount-utils: + requires: + - build + - npm-grep: + requires: + - build + - npm-eslint-plugin-dev: + requires: + - build + - npm-cypress-schematic: + requires: + - build + - v8-integration-tests: + requires: + - system-tests-node-modules-install + + - create-and-trigger-packaging-artifacts: + context: + - test-runner:upload + - test-runner:build-binary + - publish-binary + requires: + - node_modules_install + - wait-for-binary-publish: + type: approval + requires: + - create-and-trigger-packaging-artifacts + - get-published-artifacts: + context: + - publish-binary + - test-runner:commit-status-checks + requires: + - wait-for-binary-publish + - test-kitchensink: + requires: + - build + - test-kitchensink-against-staging: + - test-npm-module-on-minimum-node-version: + context: publish-binary + requires: + - get-published-artifacts + - test-types-cypress-and-jest: + context: publish-binary + requires: + - get-published-artifacts + - test-full-typescript-project: + context: publish-binary + requires: + - get-published-artifacts + - test-binary-against-kitchensink: + context: publish-binary + requires: + - get-published-artifacts + - test-binary-as-specific-user: + name: "test binary as a non-root user" + executor: non-root-docker-user + context: publish-binary + requires: + - get-published-artifacts + - test-binary-as-specific-user: + name: "test binary as a root user" + context: publish-binary + requires: + - get-published-artifacts + - binary-system-tests: + context: publish-binary + requires: + - get-published-artifacts + - system-tests-node-modules-install + - yarn-pnp-preprocessor-system-test: + context: publish-binary + requires: + - get-published-artifacts + - system-tests-node-modules-install + - svelte-webpack-system-test: + context: publish-binary + requires: + - get-published-artifacts + - system-tests-node-modules-install diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index b621ef53d8e..06b691f9163 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -4683,310 +4683,309 @@ workflows: pattern: /^pull\/[0-9]+/ value: << pipeline.git.branch >> pull-request: - pull-request: - jobs: - - node_modules_install: - build-better-sqlite3: true - - build: - context: test-runner:env-canary - requires: - - node_modules_install - - check-ts: - requires: - - build - - lint: - name: linux-lint - requires: - - build - - percy-finalize: - context: test-runner:percy - required_env_var: PERCY_TOKEN - requires: - - cli-visual-tests - - reporter-integration-tests - - run-app-component-tests-chrome - - run-app-integration-tests-chrome - - run-frontend-shared-component-tests-chrome - - run-launchpad-component-tests-chrome - - run-launchpad-integration-tests-chrome - - run-reporter-component-tests-chrome - - run-webpack-dev-server-integration-tests - - run-vite-dev-server-integration-tests - - verify-accessibility-results: - context: test-runner:cypress-record-key - requires: - - reporter-integration-tests - - run-app-component-tests-chrome - - run-app-integration-tests-chrome - - run-frontend-shared-component-tests-chrome - - run-launchpad-component-tests-chrome - - run-launchpad-integration-tests-chrome - - run-reporter-component-tests-chrome - - run-webpack-dev-server-integration-tests - - run-vite-dev-server-integration-tests - - driver-integration-tests-firefox - - driver-integration-tests-chrome - - driver-integration-tests-chrome-inject-document-domain - - driver-integration-tests-chrome-beta-inject-document-domain - - driver-integration-tests-electron - - driver-integration-tests-webkit - - driver-integration-memory-tests - - lint-types: - requires: - - build - - cli-visual-tests: - context: test-runner:percy - requires: - - build - - unit-tests: - requires: - - build - - verify-release-readiness: - context: test-runner:npm-release - requires: - - build - - server-unit-tests: - requires: - - build - - server-integration-tests: - requires: - - build - - server-performance-tests: - requires: - - build - - system-tests-node-modules-install: - context: test-runner:performance-tracking - requires: - - build - - system-tests-chrome: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-electron: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-firefox: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-webkit: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-non-root: - context: test-runner:performance-tracking - executor: non-root-docker-user - requires: - - system-tests-node-modules-install - - driver-integration-tests-chrome: - context: test-runner:cypress-record-key - requires: - - build - - driver-integration-tests-chrome-inject-document-domain: - context: test-runner:cypress-record-key - requires: - - build - - driver-integration-tests-chrome-beta: - context: test-runner:cypress-record-key - requires: - - build - - driver-integration-tests-chrome-beta-inject-document-domain: - context: test-runner:cypress-record-key - requires: - - build - - driver-integration-tests-firefox: - context: test-runner:cypress-record-key - requires: - - build - - driver-integration-tests-electron: - context: test-runner:cypress-record-key - requires: - - build - - driver-integration-tests-webkit: - context: test-runner:cypress-record-key - requires: - - build - - driver-integration-memory-tests: - requires: - - build - - run-frontend-shared-component-tests-chrome: - context: - - test-runner:cypress-record-key - - test-runner:launchpad-tests - - test-runner:percy - percy: true - requires: - - build - - run-launchpad-integration-tests-chrome: - context: - - test-runner:cypress-record-key - - test-runner:launchpad-tests - - test-runner:percy - percy: true - requires: - - build - - run-launchpad-component-tests-chrome: - context: - - test-runner:cypress-record-key - - test-runner:launchpad-tests - - test-runner:percy - percy: true - requires: - - build - - run-app-integration-tests-chrome: - context: - - test-runner:cypress-record-key - - test-runner:launchpad-tests - - test-runner:percy - percy: true - requires: - - build - - run-webpack-dev-server-integration-tests: - context: - - test-runner:cypress-record-key - - test-runner:percy - requires: - - system-tests-node-modules-install - - run-vite-dev-server-integration-tests: - context: - - test-runner:cypress-record-key - - test-runner:percy - requires: - - system-tests-node-modules-install - - run-app-component-tests-chrome: - context: - - test-runner:cypress-record-key - - test-runner:launchpad-tests - - test-runner:percy - percy: true - requires: - - build - - run-reporter-component-tests-chrome: - context: - - test-runner:cypress-record-key - - test-runner:percy - percy: true - requires: - - build - - reporter-integration-tests: - context: - - test-runner:cypress-record-key - - test-runner:percy - requires: - - build - - npm-webpack-dev-server: - requires: - - system-tests-node-modules-install - - npm-vite-dev-server: - requires: - - build - - npm-vite-plugin-cypress-esm: - requires: - - build - - npm-webpack-preprocessor: - requires: - - build - - npm-webpack-batteries-included-preprocessor: - requires: - - build - - npm-vue: - requires: - - build - - npm-puppeteer-unit-tests: - requires: - - build - - npm-puppeteer-cypress-tests: - requires: - - build - - npm-react: - requires: - - build - - npm-angular: - requires: - - build - - npm-mount-utils: - requires: - - build - - npm-grep: - requires: - - build - - npm-eslint-plugin-dev: - requires: - - build - - npm-cypress-schematic: - requires: - - build - - v8-integration-tests: - requires: - - system-tests-node-modules-install - - create-and-trigger-packaging-artifacts: - context: - - test-runner:upload - - test-runner:build-binary - - publish-binary - requires: - - node_modules_install - - wait-for-binary-publish: - requires: - - create-and-trigger-packaging-artifacts - type: approval - - get-published-artifacts: - context: - - publish-binary - - test-runner:commit-status-checks - requires: - - wait-for-binary-publish - - test-kitchensink: - requires: - - build - - test-kitchensink-against-staging: null - - test-npm-module-on-minimum-node-version: - context: publish-binary - requires: - - get-published-artifacts - - test-types-cypress-and-jest: - context: publish-binary - requires: - - get-published-artifacts - - test-full-typescript-project: - context: publish-binary - requires: - - get-published-artifacts - - test-binary-against-kitchensink: - context: publish-binary - requires: - - get-published-artifacts - - test-binary-as-specific-user: - context: publish-binary - executor: non-root-docker-user - name: test binary as a non-root user - requires: - - get-published-artifacts - - test-binary-as-specific-user: - context: publish-binary - name: test binary as a root user - requires: - - get-published-artifacts - - binary-system-tests: - context: publish-binary - requires: - - get-published-artifacts - - system-tests-node-modules-install - - yarn-pnp-preprocessor-system-test: - context: publish-binary - requires: - - get-published-artifacts - - system-tests-node-modules-install - - svelte-webpack-system-test: - context: publish-binary - requires: - - get-published-artifacts - - system-tests-node-modules-install - when: - - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> + jobs: + - node_modules_install: + build-better-sqlite3: true + - build: + context: test-runner:env-canary + requires: + - node_modules_install + - check-ts: + requires: + - build + - lint: + name: linux-lint + requires: + - build + - percy-finalize: + context: test-runner:percy + required_env_var: PERCY_TOKEN + requires: + - cli-visual-tests + - reporter-integration-tests + - run-app-component-tests-chrome + - run-app-integration-tests-chrome + - run-frontend-shared-component-tests-chrome + - run-launchpad-component-tests-chrome + - run-launchpad-integration-tests-chrome + - run-reporter-component-tests-chrome + - run-webpack-dev-server-integration-tests + - run-vite-dev-server-integration-tests + - verify-accessibility-results: + context: test-runner:cypress-record-key + requires: + - reporter-integration-tests + - run-app-component-tests-chrome + - run-app-integration-tests-chrome + - run-frontend-shared-component-tests-chrome + - run-launchpad-component-tests-chrome + - run-launchpad-integration-tests-chrome + - run-reporter-component-tests-chrome + - run-webpack-dev-server-integration-tests + - run-vite-dev-server-integration-tests + - driver-integration-tests-firefox + - driver-integration-tests-chrome + - driver-integration-tests-chrome-inject-document-domain + - driver-integration-tests-chrome-beta-inject-document-domain + - driver-integration-tests-electron + - driver-integration-tests-webkit + - driver-integration-memory-tests + - lint-types: + requires: + - build + - cli-visual-tests: + context: test-runner:percy + requires: + - build + - unit-tests: + requires: + - build + - verify-release-readiness: + context: test-runner:npm-release + requires: + - build + - server-unit-tests: + requires: + - build + - server-integration-tests: + requires: + - build + - server-performance-tests: + requires: + - build + - system-tests-node-modules-install: + context: test-runner:performance-tracking + requires: + - build + - system-tests-chrome: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-electron: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-firefox: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-webkit: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-non-root: + context: test-runner:performance-tracking + executor: non-root-docker-user + requires: + - system-tests-node-modules-install + - driver-integration-tests-chrome: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-chrome-inject-document-domain: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-chrome-beta: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-chrome-beta-inject-document-domain: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-firefox: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-electron: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-tests-webkit: + context: test-runner:cypress-record-key + requires: + - build + - driver-integration-memory-tests: + requires: + - build + - run-frontend-shared-component-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + - test-runner:percy + percy: true + requires: + - build + - run-launchpad-integration-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + - test-runner:percy + percy: true + requires: + - build + - run-launchpad-component-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + - test-runner:percy + percy: true + requires: + - build + - run-app-integration-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + - test-runner:percy + percy: true + requires: + - build + - run-webpack-dev-server-integration-tests: + context: + - test-runner:cypress-record-key + - test-runner:percy + requires: + - system-tests-node-modules-install + - run-vite-dev-server-integration-tests: + context: + - test-runner:cypress-record-key + - test-runner:percy + requires: + - system-tests-node-modules-install + - run-app-component-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:launchpad-tests + - test-runner:percy + percy: true + requires: + - build + - run-reporter-component-tests-chrome: + context: + - test-runner:cypress-record-key + - test-runner:percy + percy: true + requires: + - build + - reporter-integration-tests: + context: + - test-runner:cypress-record-key + - test-runner:percy + requires: + - build + - npm-webpack-dev-server: + requires: + - system-tests-node-modules-install + - npm-vite-dev-server: + requires: + - build + - npm-vite-plugin-cypress-esm: + requires: + - build + - npm-webpack-preprocessor: + requires: + - build + - npm-webpack-batteries-included-preprocessor: + requires: + - build + - npm-vue: + requires: + - build + - npm-puppeteer-unit-tests: + requires: + - build + - npm-puppeteer-cypress-tests: + requires: + - build + - npm-react: + requires: + - build + - npm-angular: + requires: + - build + - npm-mount-utils: + requires: + - build + - npm-grep: + requires: + - build + - npm-eslint-plugin-dev: + requires: + - build + - npm-cypress-schematic: + requires: + - build + - v8-integration-tests: + requires: + - system-tests-node-modules-install + - create-and-trigger-packaging-artifacts: + context: + - test-runner:upload + - test-runner:build-binary + - publish-binary + requires: + - node_modules_install + - wait-for-binary-publish: + requires: + - create-and-trigger-packaging-artifacts + type: approval + - get-published-artifacts: + context: + - publish-binary + - test-runner:commit-status-checks + requires: + - wait-for-binary-publish + - test-kitchensink: + requires: + - build + - test-kitchensink-against-staging: null + - test-npm-module-on-minimum-node-version: + context: publish-binary + requires: + - get-published-artifacts + - test-types-cypress-and-jest: + context: publish-binary + requires: + - get-published-artifacts + - test-full-typescript-project: + context: publish-binary + requires: + - get-published-artifacts + - test-binary-against-kitchensink: + context: publish-binary + requires: + - get-published-artifacts + - test-binary-as-specific-user: + context: publish-binary + executor: non-root-docker-user + name: test binary as a non-root user + requires: + - get-published-artifacts + - test-binary-as-specific-user: + context: publish-binary + name: test binary as a root user + requires: + - get-published-artifacts + - binary-system-tests: + context: publish-binary + requires: + - get-published-artifacts + - system-tests-node-modules-install + - yarn-pnp-preprocessor-system-test: + context: publish-binary + requires: + - get-published-artifacts + - system-tests-node-modules-install + - svelte-webpack-system-test: + context: publish-binary + requires: + - get-published-artifacts + - system-tests-node-modules-install + when: + - matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> windows: jobs: - node_modules_install: From 2caafba3f1e7aa7dcf35207995a66ba642f4adb7 Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Wed, 10 Sep 2025 11:37:18 -0400 Subject: [PATCH 05/26] more robust precommit for circleci packing --- .circleci/config.yml | 119 +++++++++--------- .circleci/src/config/@config.yml | 63 ++++++++++ .../workflows/@workflows.yml} | 0 .../workflows}/workflows/@main.yml | 29 ++--- .../workflows}/workflows/pull-request.yml | 3 +- .circleci/workflows.yml | 65 +++++++--- .husky/pre-commit | 39 +++++- 7 files changed, 213 insertions(+), 105 deletions(-) create mode 100644 .circleci/src/config/@config.yml rename .circleci/{workflows-src/@main.yml => src/workflows/@workflows.yml} (100%) rename .circleci/{workflows-src => src/workflows}/workflows/@main.yml (98%) rename .circleci/{workflows-src => src/workflows}/workflows/pull-request.yml (99%) diff --git a/.circleci/config.yml b/.circleci/config.yml index 98f7f690add..c4819e76b0b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,63 +1,60 @@ -version: 2.1 -setup: true - -orbs: - continuation: circleci/continuation@1.1.0 - jobs: - verify-ci-should-run: - resource_class: small - docker: - - image: cimg/node:current - steps: - - run: - name: Verify CI should run - command: | - # run CI when manually triggers via CircleCi Dashboard - if [ <> == 'api' ]; then - echo "Always run CI when manually triggered from the UI." - exit 0 - fi - - if [[ "$CIRCLE_BRANCH" == "develop" || "$CIRCLE_BRANCH" == "release/"* ]]; then - echo "Always run CI for develop and for release candidate branches." - exit 0 - fi - - LAST_COMMIT_MESSAGE=$(curl --silent "https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/commits/${CIRCLE_BRANCH}" | jq '.commit.message') - - if [[ "$LAST_COMMIT_MESSAGE" =~ "run ci" ]]; then - echo "Always run CI when the commit message includes 'run ci'." - exit 0 - fi - - cancel_build () { - echo "Canceling the CI build..." - circleci-agent step halt - } - - TRIGGER_INSTRUCTIONS="to trigger CI , include 'run ci' in the commit message or click the 'Trigger Pipeline' button in the CircleCI UI." - - if [ ! -z "${CIRCLE_PULL_REQUEST##*/}" ]; then - DRAFT=$(curl --silent "https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/pulls/${CIRCLE_PULL_REQUEST##*/}" | jq '.draft') - - if [[ "${DRAFT}" == true ]]; then - echo "Skipping CI; PR is in draft - $TRIGGER_INSTRUCTIONS" - cancel_build - fi - - echo "Always run CI for PR that is ready for review." - exit 0 - fi - - echo "Skipping CI; branch in progress - $TRIGGER_INSTRUCTIONS" - cancel_build - - checkout - - continuation/continue: - configuration_path: .circleci/workflows.yml - + verify-ci-should-run: + docker: + - image: cimg/node:current + resource_class: small + steps: + - run: + command: | + # run CI when manually triggers via CircleCi Dashboard + if [ <> == 'api' ]; then + echo "Always run CI when manually triggered from the UI." + exit 0 + fi + + if [[ "$CIRCLE_BRANCH" == "develop" || "$CIRCLE_BRANCH" == "release/"* ]]; then + echo "Always run CI for develop and for release candidate branches." + exit 0 + fi + + LAST_COMMIT_MESSAGE=$(curl --silent "https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/commits/${CIRCLE_BRANCH}" | jq '.commit.message') + + if [[ "$LAST_COMMIT_MESSAGE" =~ "run ci" ]]; then + echo "Always run CI when the commit message includes 'run ci'." + exit 0 + fi + + cancel_build () { + echo "Canceling the CI build..." + circleci-agent step halt + } + + TRIGGER_INSTRUCTIONS="to trigger CI , include 'run ci' in the commit message or click the 'Trigger Pipeline' button in the CircleCI UI." + + if [ ! -z "${CIRCLE_PULL_REQUEST##*/}" ]; then + DRAFT=$(curl --silent "https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/pulls/${CIRCLE_PULL_REQUEST##*/}" | jq '.draft') + + if [[ "${DRAFT}" == true ]]; then + echo "Skipping CI; PR is in draft - $TRIGGER_INSTRUCTIONS" + cancel_build + fi + + echo "Always run CI for PR that is ready for review." + exit 0 + fi + + echo "Skipping CI; branch in progress - $TRIGGER_INSTRUCTIONS" + cancel_build + name: Verify CI should run + - checkout + - continuation/continue: + configuration_path: .circleci/workflows.yml +orbs: + continuation: circleci/continuation@1.1.0 +setup: true +version: 2.1 workflows: - # the setup-workflow workflow is always triggered. - setup-workflow: - jobs: - - verify-ci-should-run + setup-workflow: + jobs: + - verify-ci-should-run + diff --git a/.circleci/src/config/@config.yml b/.circleci/src/config/@config.yml new file mode 100644 index 00000000000..98f7f690add --- /dev/null +++ b/.circleci/src/config/@config.yml @@ -0,0 +1,63 @@ +version: 2.1 +setup: true + +orbs: + continuation: circleci/continuation@1.1.0 + +jobs: + verify-ci-should-run: + resource_class: small + docker: + - image: cimg/node:current + steps: + - run: + name: Verify CI should run + command: | + # run CI when manually triggers via CircleCi Dashboard + if [ <> == 'api' ]; then + echo "Always run CI when manually triggered from the UI." + exit 0 + fi + + if [[ "$CIRCLE_BRANCH" == "develop" || "$CIRCLE_BRANCH" == "release/"* ]]; then + echo "Always run CI for develop and for release candidate branches." + exit 0 + fi + + LAST_COMMIT_MESSAGE=$(curl --silent "https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/commits/${CIRCLE_BRANCH}" | jq '.commit.message') + + if [[ "$LAST_COMMIT_MESSAGE" =~ "run ci" ]]; then + echo "Always run CI when the commit message includes 'run ci'." + exit 0 + fi + + cancel_build () { + echo "Canceling the CI build..." + circleci-agent step halt + } + + TRIGGER_INSTRUCTIONS="to trigger CI , include 'run ci' in the commit message or click the 'Trigger Pipeline' button in the CircleCI UI." + + if [ ! -z "${CIRCLE_PULL_REQUEST##*/}" ]; then + DRAFT=$(curl --silent "https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/pulls/${CIRCLE_PULL_REQUEST##*/}" | jq '.draft') + + if [[ "${DRAFT}" == true ]]; then + echo "Skipping CI; PR is in draft - $TRIGGER_INSTRUCTIONS" + cancel_build + fi + + echo "Always run CI for PR that is ready for review." + exit 0 + fi + + echo "Skipping CI; branch in progress - $TRIGGER_INSTRUCTIONS" + cancel_build + - checkout + - continuation/continue: + configuration_path: .circleci/workflows.yml + +workflows: + # the setup-workflow workflow is always triggered. + setup-workflow: + jobs: + - verify-ci-should-run diff --git a/.circleci/workflows-src/@main.yml b/.circleci/src/workflows/@workflows.yml similarity index 100% rename from .circleci/workflows-src/@main.yml rename to .circleci/src/workflows/@workflows.yml diff --git a/.circleci/workflows-src/workflows/@main.yml b/.circleci/src/workflows/workflows/@main.yml similarity index 98% rename from .circleci/workflows-src/workflows/@main.yml rename to .circleci/src/workflows/workflows/@main.yml index 164ebcba3d1..bcad3b03ac9 100644 --- a/.circleci/workflows-src/workflows/@main.yml +++ b/.circleci/src/workflows/workflows/@main.yml @@ -2,12 +2,13 @@ linux-x64: when: &full-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 >> ] - - matches: - pattern: /^release\/\d+\.\d+\.\d+$/ - value: << pipeline.git.branch >> + or: + - 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 >> ] + - matches: + pattern: /^release\/\d+\.\d+\.\d+$/ + value: << pipeline.git.branch >> jobs: - node_modules_install: build-better-sqlite3: true @@ -808,7 +809,7 @@ linux-x64-contributor: - system-tests-node-modules-install linux-arm64: - when: &full-workflow-filters + when: *full-workflow-filters jobs: - node_modules_install: name: linux-arm64-node-modules-install @@ -869,15 +870,7 @@ linux-arm64: - linux-arm64-build darwin-x64: - when: &full-workflow-filters - or: - - 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: [ 'chore/migrate-electron-lib-ts', << pipeline.git.branch >> ] - - matches: - pattern: /^release\/\d+\.\d+\.\d+$/ - value: << pipeline.git.branch >> + when: *full-workflow-filters jobs: - node_modules_install: name: darwin-x64-node-modules-install @@ -927,7 +920,7 @@ darwin-x64: - darwin-x64-build darwin-arm64: - when: &full-workflow-filters + when: *full-workflow-filters jobs: - node_modules_install: name: darwin-arm64-node-modules-install @@ -975,7 +968,7 @@ darwin-arm64: - darwin-arm64-build windows: - when: &full-workflow-filters + when: *full-workflow-filters jobs: - node_modules_install: name: windows-node-modules-install diff --git a/.circleci/workflows-src/workflows/pull-request.yml b/.circleci/src/workflows/workflows/pull-request.yml similarity index 99% rename from .circleci/workflows-src/workflows/pull-request.yml rename to .circleci/src/workflows/workflows/pull-request.yml index ebf29f2a758..ee484eecfea 100644 --- a/.circleci/workflows-src/workflows/pull-request.yml +++ b/.circleci/src/workflows/workflows/pull-request.yml @@ -1,6 +1,6 @@ when: - - matches: + matches: pattern: /^pull\/[0-9]+/ value: << pipeline.git.branch >> @@ -265,7 +265,6 @@ jobs: - test-kitchensink: requires: - build - - test-kitchensink-against-staging: - test-npm-module-on-minimum-node-version: context: publish-binary requires: diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 06b691f9163..b8fd42cfe3d 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -3647,7 +3647,17 @@ workflows: requires: - darwin-arm64-build resource_class: cypress-io/m1-macstadium - when: null + when: + or: + - equal: + - develop + - << pipeline.git.branch >> + - equal: + - update-v8-snapshot-cache-on-develop + - << pipeline.git.branch >> + - matches: + pattern: /^release\/\d+\.\d+\.\d+$/ + value: << pipeline.git.branch >> darwin-x64: jobs: - node_modules_install: @@ -3699,9 +3709,6 @@ workflows: - equal: - update-v8-snapshot-cache-on-develop - << pipeline.git.branch >> - - equal: - - chore/migrate-electron-lib-ts - - << pipeline.git.branch >> - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -3759,7 +3766,17 @@ workflows: requires: - linux-arm64-build resource_class: arm.medium - when: null + when: + or: + - equal: + - develop + - << pipeline.git.branch >> + - equal: + - update-v8-snapshot-cache-on-develop + - << pipeline.git.branch >> + - matches: + pattern: /^release\/\d+\.\d+\.\d+$/ + value: << pipeline.git.branch >> linux-x64: jobs: - node_modules_install: @@ -4235,15 +4252,16 @@ workflows: - get-published-artifacts - system-tests-node-modules-install when: - - equal: - - develop - - << pipeline.git.branch >> - - equal: - - update-v8-snapshot-cache-on-develop - - << pipeline.git.branch >> - - matches: - pattern: /^release\/\d+\.\d+\.\d+$/ - value: << pipeline.git.branch >> + or: + - equal: + - develop + - << pipeline.git.branch >> + - equal: + - update-v8-snapshot-cache-on-develop + - << pipeline.git.branch >> + - matches: + pattern: /^release\/\d+\.\d+\.\d+$/ + value: << pipeline.git.branch >> linux-x64-contributor: jobs: - node_modules_install @@ -4939,7 +4957,6 @@ workflows: - test-kitchensink: requires: - build - - test-kitchensink-against-staging: null - test-npm-module-on-minimum-node-version: context: publish-binary requires: @@ -4983,9 +5000,9 @@ workflows: - get-published-artifacts - system-tests-node-modules-install when: - - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> + matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> windows: jobs: - node_modules_install: @@ -5058,4 +5075,14 @@ workflows: requires: - windows-build resource_class: windows.medium - when: null + when: + or: + - equal: + - develop + - << pipeline.git.branch >> + - equal: + - update-v8-snapshot-cache-on-develop + - << pipeline.git.branch >> + - matches: + pattern: /^release\/\d+\.\d+\.\d+$/ + value: << pipeline.git.branch >> diff --git a/.husky/pre-commit b/.husky/pre-commit index 7db2d773612..f3e46157ca6 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,11 +1,40 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -# Pack CircleCI config if any files in pull-request were changed -if git diff --cached --name-only | grep -q "^\.circleci/workflows-src/"; then - echo "Packing CircleCI configuration..." - circleci config pack ./.circleci/workflows-src > ./.circleci/workflows.yml - git add ./.circleci/workflows.yml +# Pack CircleCI config if any files in .circleci/src were changed +if git diff --cached --name-only | grep -q "^\.circleci/src/"; then + if ! which circleci > /dev/null; then + echo "❌ Warning: CircleCI CLI not found! Install the CircleCi CLI to edit the CircleCI configuration." + exit 0 + fi + + echo "Processing CircleCI configurations..." + + # Find all directories in .circleci/src + for dir in ./.circleci/src/*/; do + if [ -d "$dir" ]; then + dirname=$(basename "$dir") + output_file="./.circleci/${dirname}.yml" + + echo "📦 Packing ${dirname} configuration..." + if ! circleci config pack "$dir" > "$output_file"; then + echo "❌ Failed to pack ${dirname} configuration!" + exit 1 + fi + echo "✅ Packed ${dirname} configuration" + + echo "🔍 Validating ${dirname} configuration..." + if ! circleci config validate "$output_file"; then + echo "❌ ${dirname} configuration validation failed!" + exit 1 + fi + echo "✅ ${dirname} configuration validated successfully" + + git add "$output_file" + fi + done + + echo "🎉 All CircleCI configurations processed successfully!" fi npx lint-staged From 7e4285fbb735fde85bca9d3e34e3f1ca6c3e63fc Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Wed, 10 Sep 2025 11:40:47 -0400 Subject: [PATCH 06/26] even nicer stdout for precommit :) --- .husky/pre-commit | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index f3e46157ca6..1fe58c2f25a 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -16,21 +16,22 @@ if git diff --cached --name-only | grep -q "^\.circleci/src/"; then dirname=$(basename "$dir") output_file="./.circleci/${dirname}.yml" - echo "📦 Packing ${dirname} configuration..." + echo "📦 Packing ${dirname}.yml configuration..." if ! circleci config pack "$dir" > "$output_file"; then - echo "❌ Failed to pack ${dirname} configuration!" + echo " ❌ Failed to pack ${output_file}" exit 1 fi - echo "✅ Packed ${dirname} configuration" + echo " ✅ Packed ${output_file}" - echo "🔍 Validating ${dirname} configuration..." + echo " 🔍 Validating ${output_file}" if ! circleci config validate "$output_file"; then - echo "❌ ${dirname} configuration validation failed!" + echo " ❌ Validating ${output_file} failed" exit 1 fi - echo "✅ ${dirname} configuration validated successfully" + echo " ✅ ${dirname}.yml configuration validated successfully" git add "$output_file" + echo " 📝 ${output_file} staged for commit" fi done From bdb8194b5e6ce834fae11a79390b9937f0507850 Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Wed, 10 Sep 2025 12:53:29 -0400 Subject: [PATCH 07/26] allow pr pipeline on this branch --- .circleci/src/workflows/workflows/pull-request.yml | 10 +++++++--- .circleci/workflows.yml | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.circleci/src/workflows/workflows/pull-request.yml b/.circleci/src/workflows/workflows/pull-request.yml index ee484eecfea..3568756319a 100644 --- a/.circleci/src/workflows/workflows/pull-request.yml +++ b/.circleci/src/workflows/workflows/pull-request.yml @@ -1,8 +1,12 @@ when: - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> + or: + - matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> + - matches: + pattern: /^use-pack-for-circle/ + value: << pipeline.git.branch >> jobs: - node_modules_install: diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index b8fd42cfe3d..fc609294769 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -5000,9 +5000,13 @@ workflows: - get-published-artifacts - system-tests-node-modules-install when: - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> + or: + - matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> + - matches: + pattern: /^use-pack-for-circle/ + value: << pipeline.git.branch >> windows: jobs: - node_modules_install: From 79c4d964962502dd99b52627021ace11e75cd6a4 Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Thu, 11 Sep 2025 10:20:44 -0400 Subject: [PATCH 08/26] split up the config.yml to demonstrate more fully --- .circleci/src/config/@config.yml | 61 +------------------ .../src/config/jobs/verify-ci-should-run.yml | 49 +++++++++++++++ .../src/config/workflows/setup-workflow.yml | 2 + 3 files changed, 52 insertions(+), 60 deletions(-) create mode 100644 .circleci/src/config/jobs/verify-ci-should-run.yml create mode 100644 .circleci/src/config/workflows/setup-workflow.yml diff --git a/.circleci/src/config/@config.yml b/.circleci/src/config/@config.yml index 98f7f690add..22eaa1b6649 100644 --- a/.circleci/src/config/@config.yml +++ b/.circleci/src/config/@config.yml @@ -1,63 +1,4 @@ version: 2.1 setup: true - orbs: - continuation: circleci/continuation@1.1.0 - -jobs: - verify-ci-should-run: - resource_class: small - docker: - - image: cimg/node:current - steps: - - run: - name: Verify CI should run - command: | - # run CI when manually triggers via CircleCi Dashboard - if [ <> == 'api' ]; then - echo "Always run CI when manually triggered from the UI." - exit 0 - fi - - if [[ "$CIRCLE_BRANCH" == "develop" || "$CIRCLE_BRANCH" == "release/"* ]]; then - echo "Always run CI for develop and for release candidate branches." - exit 0 - fi - - LAST_COMMIT_MESSAGE=$(curl --silent "https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/commits/${CIRCLE_BRANCH}" | jq '.commit.message') - - if [[ "$LAST_COMMIT_MESSAGE" =~ "run ci" ]]; then - echo "Always run CI when the commit message includes 'run ci'." - exit 0 - fi - - cancel_build () { - echo "Canceling the CI build..." - circleci-agent step halt - } - - TRIGGER_INSTRUCTIONS="to trigger CI , include 'run ci' in the commit message or click the 'Trigger Pipeline' button in the CircleCI UI." - - if [ ! -z "${CIRCLE_PULL_REQUEST##*/}" ]; then - DRAFT=$(curl --silent "https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/pulls/${CIRCLE_PULL_REQUEST##*/}" | jq '.draft') - - if [[ "${DRAFT}" == true ]]; then - echo "Skipping CI; PR is in draft - $TRIGGER_INSTRUCTIONS" - cancel_build - fi - - echo "Always run CI for PR that is ready for review." - exit 0 - fi - - echo "Skipping CI; branch in progress - $TRIGGER_INSTRUCTIONS" - cancel_build - - checkout - - continuation/continue: - configuration_path: .circleci/workflows.yml - -workflows: - # the setup-workflow workflow is always triggered. - setup-workflow: - jobs: - - verify-ci-should-run + continuation: circleci/continuation@1.1.0 \ No newline at end of file diff --git a/.circleci/src/config/jobs/verify-ci-should-run.yml b/.circleci/src/config/jobs/verify-ci-should-run.yml new file mode 100644 index 00000000000..e037876c090 --- /dev/null +++ b/.circleci/src/config/jobs/verify-ci-should-run.yml @@ -0,0 +1,49 @@ +resource_class: small +docker: + - image: cimg/node:current +steps: + - run: + name: Verify CI should run + command: | + # run CI when manually triggers via CircleCi Dashboard + if [ <> == 'api' ]; then + echo "Always run CI when manually triggered from the UI." + exit 0 + fi + + if [[ "$CIRCLE_BRANCH" == "develop" || "$CIRCLE_BRANCH" == "release/"* ]]; then + echo "Always run CI for develop and for release candidate branches." + exit 0 + fi + + LAST_COMMIT_MESSAGE=$(curl --silent "https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/commits/${CIRCLE_BRANCH}" | jq '.commit.message') + + if [[ "$LAST_COMMIT_MESSAGE" =~ "run ci" ]]; then + echo "Always run CI when the commit message includes 'run ci'." + exit 0 + fi + + cancel_build () { + echo "Canceling the CI build..." + circleci-agent step halt + } + + TRIGGER_INSTRUCTIONS="to trigger CI , include 'run ci' in the commit message or click the 'Trigger Pipeline' button in the CircleCI UI." + + if [ ! -z "${CIRCLE_PULL_REQUEST##*/}" ]; then + DRAFT=$(curl --silent "https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/pulls/${CIRCLE_PULL_REQUEST##*/}" | jq '.draft') + + if [[ "${DRAFT}" == true ]]; then + echo "Skipping CI; PR is in draft - $TRIGGER_INSTRUCTIONS" + cancel_build + fi + + echo "Always run CI for PR that is ready for review." + exit 0 + fi + + echo "Skipping CI; branch in progress - $TRIGGER_INSTRUCTIONS" + cancel_build + - checkout + - continuation/continue: + configuration_path: .circleci/workflows.yml \ No newline at end of file diff --git a/.circleci/src/config/workflows/setup-workflow.yml b/.circleci/src/config/workflows/setup-workflow.yml new file mode 100644 index 00000000000..c0a30f2c072 --- /dev/null +++ b/.circleci/src/config/workflows/setup-workflow.yml @@ -0,0 +1,2 @@ +jobs: + - verify-ci-should-run \ No newline at end of file From 658228f433d62f88cd11d518c8a80adae53dbc6b Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Fri, 12 Sep 2025 12:40:48 -0400 Subject: [PATCH 09/26] remove linux-x64-contributor workflow, use contributor workflow to kick off pull-request workflow after approval --- .circleci/src/workflows/@workflows.yml | 6 + .circleci/src/workflows/workflows/@main.yml | 382 -------------- .../workflows/contributor-approval.yml | 15 + .../src/workflows/workflows/pull-request.yml | 27 +- .circleci/workflows.yml | 485 ++---------------- 5 files changed, 82 insertions(+), 833 deletions(-) create mode 100644 .circleci/src/workflows/workflows/contributor-approval.yml diff --git a/.circleci/src/workflows/@workflows.yml b/.circleci/src/workflows/@workflows.yml index b5ce080530a..167ea718ae7 100644 --- a/.circleci/src/workflows/@workflows.yml +++ b/.circleci/src/workflows/@workflows.yml @@ -4,8 +4,14 @@ chrome-stable-version: &chrome-stable-version "140.0.7339.127" chrome-beta-version: &chrome-beta-version "141.0.7390.16" firefox-stable-version: &firefox-stable-version "142.0" +parameters: + approved_contributor_pr: + type: boolean + default: false + orbs: browser-tools: circleci/browser-tools@2.1.1 + continuation: circleci/continuation@1.1.0 defaults: &defaults parallelism: 1 diff --git a/.circleci/src/workflows/workflows/@main.yml b/.circleci/src/workflows/workflows/@main.yml index bcad3b03ac9..9bad35e08f7 100644 --- a/.circleci/src/workflows/workflows/@main.yml +++ b/.circleci/src/workflows/workflows/@main.yml @@ -1,5 +1,3 @@ - - linux-x64: when: &full-workflow-filters or: @@ -428,386 +426,6 @@ linux-x64: - get-published-artifacts - system-tests-node-modules-install -linux-x64-contributor: - when: - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> - jobs: - - node_modules_install - - build: - is_contributor_pr: true - requires: - - node_modules_install - # In subsequent jobs, we use some contexts that are restricted to members of the Cypress organization. - # This job will allow for a Cypress member to approve and run the rest of the restricted jobs in the pipeline after the contributor code has been reviewed. - - contributor-pr: - type: approval - requires: - - build - # verify-accessibility-results is required for status checks, however, it will be skipped for contributors so it - # can run in any order - - verify-accessibility-results - - check-ts: - requires: - - build - - lint: - name: linux-lint - requires: - - build - - percy-finalize: - context: test-runner:percy - required_env_var: PERCY_TOKEN # skips job if not defined (external PR) - requires: - - cli-visual-tests - - reporter-integration-tests - - run-app-component-tests-chrome - - run-app-integration-tests-chrome - - run-frontend-shared-component-tests-chrome - - run-launchpad-component-tests-chrome - - run-launchpad-integration-tests-chrome - - run-reporter-component-tests-chrome - - run-webpack-dev-server-integration-tests - - run-vite-dev-server-integration-tests - - lint-types: - requires: - - build - # unit, integration and e2e tests - - cli-visual-tests: - context: test-runner:percy - requires: - - contributor-pr - - unit-tests: - requires: - - build - - verify-release-readiness: - context: test-runner:npm-release - requires: - - contributor-pr - - server-unit-tests: - requires: - - build - - server-integration-tests: - requires: - - build - - server-performance-tests: - requires: - - build - - system-tests-node-modules-install: - context: test-runner:performance-tracking - requires: - - contributor-pr - - system-tests-chrome: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-electron: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-firefox: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-webkit: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-non-root: - context: test-runner:performance-tracking - executor: non-root-docker-user - requires: - - system-tests-node-modules-install - - driver-integration-tests-chrome: - context: test-runner:cypress-record-key - requires: - - contributor-pr - - driver-integration-tests-chrome-inject-document-domain: - context: test-runner:cypress-record-key - requires: - - contributor-pr - - driver-integration-tests-chrome-beta: - context: test-runner:cypress-record-key - requires: - - contributor-pr - - driver-integration-tests-chrome-beta-inject-document-domain: - context: test-runner:cypress-record-key - requires: - - contributor-pr - - driver-integration-tests-firefox: - context: test-runner:cypress-record-key - requires: - - contributor-pr - - driver-integration-tests-electron: - context: test-runner:cypress-record-key - requires: - - contributor-pr - - driver-integration-tests-webkit: - context: test-runner:cypress-record-key - requires: - - contributor-pr - - driver-integration-memory-tests: - requires: - - build - - run-frontend-shared-component-tests-chrome: - context: - [ - test-runner:cypress-record-key, - test-runner:launchpad-tests, - test-runner:percy - ] - percy: true - requires: - - contributor-pr - - run-launchpad-integration-tests-chrome: - context: - [ - test-runner:cypress-record-key, - test-runner:launchpad-tests, - test-runner:percy - ] - percy: true - requires: - - contributor-pr - - run-launchpad-component-tests-chrome: - context: - [ - test-runner:cypress-record-key, - test-runner:launchpad-tests, - test-runner:percy - ] - percy: true - requires: - - contributor-pr - - run-app-integration-tests-chrome: - context: - [ - test-runner:cypress-record-key, - test-runner:launchpad-tests, - test-runner:percy - ] - percy: true - requires: - - contributor-pr - - run-webpack-dev-server-integration-tests: - context: [ test-runner:cypress-record-key, test-runner:percy ] - requires: - - system-tests-node-modules-install - - run-vite-dev-server-integration-tests: - context: [ test-runner:cypress-record-key, test-runner:percy ] - requires: - - system-tests-node-modules-install - - run-app-component-tests-chrome: - context: - [ - test-runner:cypress-record-key, - test-runner:launchpad-tests, - test-runner:percy - ] - percy: true - requires: - - contributor-pr - - run-reporter-component-tests-chrome: - context: [ test-runner:cypress-record-key, test-runner:percy ] - percy: true - requires: - - contributor-pr - - reporter-integration-tests: - context: [ test-runner:cypress-record-key, test-runner:percy ] - requires: - - contributor-pr - - npm-webpack-dev-server: - requires: - - system-tests-node-modules-install - - npm-vite-dev-server: - requires: - - build - - npm-vite-plugin-cypress-esm: - requires: - - build - - npm-webpack-preprocessor: - requires: - - build - - npm-webpack-batteries-included-preprocessor: - requires: - - build - - npm-vue: - requires: - - build - - npm-puppeteer-unit-tests: - requires: - - build - - npm-puppeteer-cypress-tests: - requires: - - build - - npm-react: - requires: - - build - - npm-angular: - requires: - - build - - npm-mount-utils: - requires: - - build - - npm-grep: - requires: - - build - - npm-eslint-plugin-dev: - requires: - - build - - npm-cypress-schematic: - requires: - - build - - v8-integration-tests: - requires: - - system-tests-node-modules-install - - - ready-to-release: - requires: - - check-ts - - npm-angular - - npm-eslint-plugin-dev - - npm-puppeteer-unit-tests - - npm-puppeteer-cypress-tests - - npm-react - - npm-mount-utils - - npm-grep - - npm-vue - - npm-webpack-batteries-included-preprocessor - - npm-webpack-preprocessor - - npm-vite-dev-server - - npm-vite-plugin-cypress-esm - - npm-webpack-dev-server - - npm-cypress-schematic - - lint-types - - linux-lint - - percy-finalize - - driver-integration-tests-firefox - - driver-integration-tests-chrome - - driver-integration-tests-chrome-beta - - driver-integration-tests-electron - - driver-integration-tests-webkit - - driver-integration-memory-tests - - system-tests-non-root - - system-tests-firefox - - system-tests-electron - - system-tests-chrome - - system-tests-webkit - - server-performance-tests - - server-integration-tests - - server-unit-tests - - "test binary as a non-root user" - - "test binary as a root user" - - test-types-cypress-and-jest - - test-full-typescript-project - - test-binary-against-kitchensink - - test-npm-module-on-minimum-node-version - - binary-system-tests - - test-kitchensink - - unit-tests - - verify-release-readiness - - v8-integration-tests - - - npm-release: - context: test-runner:npm-release - requires: - - ready-to-release - - - create-and-trigger-packaging-artifacts: - context: [ test-runner:upload, test-runner:build-binary, publish-binary ] - requires: - - contributor-pr - - get-published-artifacts: - context: [ publish-binary, test-runner:commit-status-checks ] - requires: - - create-and-trigger-packaging-artifacts - # various testing scenarios, like building full binary - # and testing it on a real project - - test-against-staging: - context: test-runner:record-tests - filters: *mainBuildFilters - requires: - - build - - test-kitchensink: - requires: - - build - - test-kitchensink-against-staging: - executor: kitchensink-executor - context: test-runner:record-tests - filters: *mainBuildFilters - requires: - - build - - test-npm-module-on-minimum-node-version: - context: publish-binary - requires: - - get-published-artifacts - - test-types-cypress-and-jest: - context: publish-binary - requires: - - get-published-artifacts - - test-full-typescript-project: - context: publish-binary - requires: - - get-published-artifacts - - test-binary-against-kitchensink: - context: publish-binary - requires: - - get-published-artifacts - - test-npm-module-and-verify-binary: - filters: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-staging: - context: test-runner:record-tests - filters: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-kitchensink-chrome: - filters: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-recipes-firefox: - filters: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-recipes-chrome: - filters: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-recipes: - filters: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-kitchensink-firefox: - filters: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-todomvc-firefox: - filters: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-against-cypress-realworld-app: - context: test-runner:cypress-record-key - filters: *mainBuildFilters - requires: - - get-published-artifacts - - test-binary-as-specific-user: - name: "test binary as a non-root user" - executor: non-root-docker-user - context: publish-binary - requires: - - get-published-artifacts - - test-binary-as-specific-user: - name: "test binary as a root user" - context: publish-binary - requires: - - get-published-artifacts - - binary-system-tests: - context: publish-binary - requires: - - get-published-artifacts - - system-tests-node-modules-install - linux-arm64: when: *full-workflow-filters jobs: diff --git a/.circleci/src/workflows/workflows/contributor-approval.yml b/.circleci/src/workflows/workflows/contributor-approval.yml new file mode 100644 index 00000000000..b6580096ccb --- /dev/null +++ b/.circleci/src/workflows/workflows/contributor-approval.yml @@ -0,0 +1,15 @@ +# Contributor / Forked PRs have a branch name that starts with "pull/" followed by the PR number + +when: + matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> + +jobs: + - approve-contributor-pr: + type: approval + - continuation/continue: + configuration_path: .circleci/workflows.yml + parameters: '{ approved_contributor_pr: true }' # when set to true, the main pull-request workflow will run + requires: + - approve-contributor-pr diff --git a/.circleci/src/workflows/workflows/pull-request.yml b/.circleci/src/workflows/workflows/pull-request.yml index 3568756319a..b3f957d3a32 100644 --- a/.circleci/src/workflows/workflows/pull-request.yml +++ b/.circleci/src/workflows/workflows/pull-request.yml @@ -1,12 +1,25 @@ - +# The workflow runs for: +# External PR after approval (approved contributor PR that's not a main branch) +# Internal PR for any branch that does is not develop or release/ related when: or: - - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> - - matches: - pattern: /^use-pack-for-circle/ - value: << pipeline.git.branch >> + - and: + - equal: [ << pipeline.parameters.approved_contributor_pr >>, true ] + - matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> + - not: + or: + - equal: [ "develop", << pipeline.git.branch >> ] + - matches: + pattern: /^release\/.*/ + value: << pipeline.git.branch >> + - not: + or: + - equal: [ "develop", << pipeline.git.branch >> ] + - matches: + pattern: /^release\/.*/ + value: << pipeline.git.branch >> jobs: - node_modules_install: diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index c8aca4aba15..32be3e210c1 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -3602,8 +3602,26 @@ jobs: working_directory: ~/cypress orbs: browser-tools: circleci/browser-tools@2.1.1 + continuation: circleci/continuation@1.1.0 +parameters: + approved_contributor_pr: + default: false + type: boolean version: 2.1 workflows: + contributor-approval: + jobs: + - approve-contributor-pr: + type: approval + - continuation/continue: + configuration_path: .circleci/workflows.yml + parameters: '{ approved_contributor_pr: true }' + requires: + - approve-contributor-pr + when: + matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> darwin-arm64: jobs: - node_modules_install: @@ -4262,444 +4280,6 @@ workflows: - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> - linux-x64-contributor: - jobs: - - node_modules_install - - build: - is_contributor_pr: true - requires: - - node_modules_install - - contributor-pr: - requires: - - build - type: approval - - verify-accessibility-results - - check-ts: - requires: - - build - - lint: - name: linux-lint - requires: - - build - - percy-finalize: - context: test-runner:percy - required_env_var: PERCY_TOKEN - requires: - - cli-visual-tests - - reporter-integration-tests - - run-app-component-tests-chrome - - run-app-integration-tests-chrome - - run-frontend-shared-component-tests-chrome - - run-launchpad-component-tests-chrome - - run-launchpad-integration-tests-chrome - - run-reporter-component-tests-chrome - - run-webpack-dev-server-integration-tests - - run-vite-dev-server-integration-tests - - lint-types: - requires: - - build - - cli-visual-tests: - context: test-runner:percy - requires: - - contributor-pr - - unit-tests: - requires: - - build - - verify-release-readiness: - context: test-runner:npm-release - requires: - - contributor-pr - - server-unit-tests: - requires: - - build - - server-integration-tests: - requires: - - build - - server-performance-tests: - requires: - - build - - system-tests-node-modules-install: - context: test-runner:performance-tracking - requires: - - contributor-pr - - system-tests-chrome: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-electron: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-firefox: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-webkit: - context: test-runner:performance-tracking - requires: - - system-tests-node-modules-install - - system-tests-non-root: - context: test-runner:performance-tracking - executor: non-root-docker-user - requires: - - system-tests-node-modules-install - - driver-integration-tests-chrome: - context: test-runner:cypress-record-key - requires: - - contributor-pr - - driver-integration-tests-chrome-inject-document-domain: - context: test-runner:cypress-record-key - requires: - - contributor-pr - - driver-integration-tests-chrome-beta: - context: test-runner:cypress-record-key - requires: - - contributor-pr - - driver-integration-tests-chrome-beta-inject-document-domain: - context: test-runner:cypress-record-key - requires: - - contributor-pr - - driver-integration-tests-firefox: - context: test-runner:cypress-record-key - requires: - - contributor-pr - - driver-integration-tests-electron: - context: test-runner:cypress-record-key - requires: - - contributor-pr - - driver-integration-tests-webkit: - context: test-runner:cypress-record-key - requires: - - contributor-pr - - driver-integration-memory-tests: - requires: - - build - - run-frontend-shared-component-tests-chrome: - context: - - test-runner:cypress-record-key - - test-runner:launchpad-tests - - test-runner:percy - percy: true - requires: - - contributor-pr - - run-launchpad-integration-tests-chrome: - context: - - test-runner:cypress-record-key - - test-runner:launchpad-tests - - test-runner:percy - percy: true - requires: - - contributor-pr - - run-launchpad-component-tests-chrome: - context: - - test-runner:cypress-record-key - - test-runner:launchpad-tests - - test-runner:percy - percy: true - requires: - - contributor-pr - - run-app-integration-tests-chrome: - context: - - test-runner:cypress-record-key - - test-runner:launchpad-tests - - test-runner:percy - percy: true - requires: - - contributor-pr - - run-webpack-dev-server-integration-tests: - context: - - test-runner:cypress-record-key - - test-runner:percy - requires: - - system-tests-node-modules-install - - run-vite-dev-server-integration-tests: - context: - - test-runner:cypress-record-key - - test-runner:percy - requires: - - system-tests-node-modules-install - - run-app-component-tests-chrome: - context: - - test-runner:cypress-record-key - - test-runner:launchpad-tests - - test-runner:percy - percy: true - requires: - - contributor-pr - - run-reporter-component-tests-chrome: - context: - - test-runner:cypress-record-key - - test-runner:percy - percy: true - requires: - - contributor-pr - - reporter-integration-tests: - context: - - test-runner:cypress-record-key - - test-runner:percy - requires: - - contributor-pr - - npm-webpack-dev-server: - requires: - - system-tests-node-modules-install - - npm-vite-dev-server: - requires: - - build - - npm-vite-plugin-cypress-esm: - requires: - - build - - npm-webpack-preprocessor: - requires: - - build - - npm-webpack-batteries-included-preprocessor: - requires: - - build - - npm-vue: - requires: - - build - - npm-puppeteer-unit-tests: - requires: - - build - - npm-puppeteer-cypress-tests: - requires: - - build - - npm-react: - requires: - - build - - npm-angular: - requires: - - build - - npm-mount-utils: - requires: - - build - - npm-grep: - requires: - - build - - npm-eslint-plugin-dev: - requires: - - build - - npm-cypress-schematic: - requires: - - build - - v8-integration-tests: - requires: - - system-tests-node-modules-install - - ready-to-release: - requires: - - check-ts - - npm-angular - - npm-eslint-plugin-dev - - npm-puppeteer-unit-tests - - npm-puppeteer-cypress-tests - - npm-react - - npm-mount-utils - - npm-grep - - npm-vue - - npm-webpack-batteries-included-preprocessor - - npm-webpack-preprocessor - - npm-vite-dev-server - - npm-vite-plugin-cypress-esm - - npm-webpack-dev-server - - npm-cypress-schematic - - lint-types - - linux-lint - - percy-finalize - - driver-integration-tests-firefox - - driver-integration-tests-chrome - - driver-integration-tests-chrome-beta - - driver-integration-tests-electron - - driver-integration-tests-webkit - - driver-integration-memory-tests - - system-tests-non-root - - system-tests-firefox - - system-tests-electron - - system-tests-chrome - - system-tests-webkit - - server-performance-tests - - server-integration-tests - - server-unit-tests - - test binary as a non-root user - - test binary as a root user - - test-types-cypress-and-jest - - test-full-typescript-project - - test-binary-against-kitchensink - - test-npm-module-on-minimum-node-version - - binary-system-tests - - test-kitchensink - - unit-tests - - verify-release-readiness - - v8-integration-tests - - npm-release: - context: test-runner:npm-release - requires: - - ready-to-release - - create-and-trigger-packaging-artifacts: - context: - - test-runner:upload - - test-runner:build-binary - - publish-binary - requires: - - contributor-pr - - get-published-artifacts: - context: - - publish-binary - - test-runner:commit-status-checks - requires: - - create-and-trigger-packaging-artifacts - - test-against-staging: - context: test-runner:record-tests - filters: - branches: - only: - - develop - - /^release\/\d+\.\d+\.\d+$/ - - update-v8-snapshot-cache-on-develop - - chore/refactor_cli_to_ts - requires: - - build - - test-kitchensink: - requires: - - build - - test-kitchensink-against-staging: - context: test-runner:record-tests - executor: kitchensink-executor - filters: - branches: - only: - - develop - - /^release\/\d+\.\d+\.\d+$/ - - update-v8-snapshot-cache-on-develop - - chore/refactor_cli_to_ts - requires: - - build - - test-npm-module-on-minimum-node-version: - context: publish-binary - requires: - - get-published-artifacts - - test-types-cypress-and-jest: - context: publish-binary - requires: - - get-published-artifacts - - test-full-typescript-project: - context: publish-binary - requires: - - get-published-artifacts - - test-binary-against-kitchensink: - context: publish-binary - requires: - - get-published-artifacts - - test-npm-module-and-verify-binary: - filters: - branches: - only: - - develop - - /^release\/\d+\.\d+\.\d+$/ - - update-v8-snapshot-cache-on-develop - - chore/refactor_cli_to_ts - requires: - - get-published-artifacts - - test-binary-against-staging: - context: test-runner:record-tests - filters: - branches: - only: - - develop - - /^release\/\d+\.\d+\.\d+$/ - - update-v8-snapshot-cache-on-develop - - chore/refactor_cli_to_ts - requires: - - get-published-artifacts - - test-binary-against-kitchensink-chrome: - filters: - branches: - only: - - develop - - /^release\/\d+\.\d+\.\d+$/ - - update-v8-snapshot-cache-on-develop - - chore/refactor_cli_to_ts - requires: - - get-published-artifacts - - test-binary-against-recipes-firefox: - filters: - branches: - only: - - develop - - /^release\/\d+\.\d+\.\d+$/ - - update-v8-snapshot-cache-on-develop - - chore/refactor_cli_to_ts - requires: - - get-published-artifacts - - test-binary-against-recipes-chrome: - filters: - branches: - only: - - develop - - /^release\/\d+\.\d+\.\d+$/ - - update-v8-snapshot-cache-on-develop - - chore/refactor_cli_to_ts - requires: - - get-published-artifacts - - test-binary-against-recipes: - filters: - branches: - only: - - develop - - /^release\/\d+\.\d+\.\d+$/ - - update-v8-snapshot-cache-on-develop - - chore/refactor_cli_to_ts - requires: - - get-published-artifacts - - test-binary-against-kitchensink-firefox: - filters: - branches: - only: - - develop - - /^release\/\d+\.\d+\.\d+$/ - - update-v8-snapshot-cache-on-develop - - chore/refactor_cli_to_ts - requires: - - get-published-artifacts - - test-binary-against-todomvc-firefox: - filters: - branches: - only: - - develop - - /^release\/\d+\.\d+\.\d+$/ - - update-v8-snapshot-cache-on-develop - - chore/refactor_cli_to_ts - requires: - - get-published-artifacts - - test-binary-against-cypress-realworld-app: - context: test-runner:cypress-record-key - filters: - branches: - only: - - develop - - /^release\/\d+\.\d+\.\d+$/ - - update-v8-snapshot-cache-on-develop - - chore/refactor_cli_to_ts - requires: - - get-published-artifacts - - test-binary-as-specific-user: - context: publish-binary - executor: non-root-docker-user - name: test binary as a non-root user - requires: - - get-published-artifacts - - test-binary-as-specific-user: - context: publish-binary - name: test binary as a root user - requires: - - get-published-artifacts - - binary-system-tests: - context: publish-binary - requires: - - get-published-artifacts - - system-tests-node-modules-install - when: - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> pull-request: jobs: - node_modules_install: @@ -5001,12 +4581,29 @@ workflows: - system-tests-node-modules-install when: or: - - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> - - matches: - pattern: /^use-pack-for-circle/ - value: << pipeline.git.branch >> + - and: + - equal: + - << pipeline.parameters.approved_contributor_pr >> + - true + - matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> + - not: null + or: + - equal: + - develop + - << pipeline.git.branch >> + - matches: null + pattern: /^release\/.*/ + value: << pipeline.git.branch >> + - not: null + or: + - equal: + - develop + - << pipeline.git.branch >> + - matches: + pattern: /^release\/.*/ + value: << pipeline.git.branch >> windows: jobs: - node_modules_install: From 3684c764f8f7f93c02e2e74954d65e703e4b89cd Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Fri, 12 Sep 2025 13:14:06 -0400 Subject: [PATCH 10/26] do not run pull-request for contributor prs that have not been approved --- .../src/workflows/workflows/pull-request.yml | 21 +++++++------ .circleci/workflows.yml | 31 ++++++++++--------- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/.circleci/src/workflows/workflows/pull-request.yml b/.circleci/src/workflows/workflows/pull-request.yml index b3f957d3a32..9144434cce2 100644 --- a/.circleci/src/workflows/workflows/pull-request.yml +++ b/.circleci/src/workflows/workflows/pull-request.yml @@ -9,17 +9,20 @@ when: pattern: /^pull\/[0-9]+/ value: << pipeline.git.branch >> - not: - or: - - equal: [ "develop", << pipeline.git.branch >> ] - - matches: + or: + - equal: [ "develop", << pipeline.git.branch >> ] + - matches: + pattern: /^release\/.*/ + value: << pipeline.git.branch >> + - not: + or: + - equal: [ "develop", << pipeline.git.branch >> ] + - matches: pattern: /^release\/.*/ value: << pipeline.git.branch >> - - not: - or: - - equal: [ "develop", << pipeline.git.branch >> ] - - matches: - pattern: /^release\/.*/ - value: << pipeline.git.branch >> + - matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> jobs: - node_modules_install: diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 32be3e210c1..3f87cb6ce71 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -4588,22 +4588,25 @@ workflows: - matches: pattern: /^pull\/[0-9]+/ value: << pipeline.git.branch >> - - not: null - or: - - equal: - - develop - - << pipeline.git.branch >> - - matches: null + - not: + or: + - equal: + - develop + - << pipeline.git.branch >> + - matches: + pattern: /^release\/.*/ + value: << pipeline.git.branch >> + - not: + or: + - equal: + - develop + - << pipeline.git.branch >> + - matches: pattern: /^release\/.*/ value: << pipeline.git.branch >> - - not: null - or: - - equal: - - develop - - << pipeline.git.branch >> - - matches: - pattern: /^release\/.*/ - value: << pipeline.git.branch >> + - matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> windows: jobs: - node_modules_install: From 07e12e1fbdf1094d2ff7993718de92c961865100 Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Fri, 12 Sep 2025 13:23:06 -0400 Subject: [PATCH 11/26] use job level continuation --- .../src/workflows/workflows/contributor-approval.yml | 8 +++++--- .circleci/workflows.yml | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.circleci/src/workflows/workflows/contributor-approval.yml b/.circleci/src/workflows/workflows/contributor-approval.yml index b6580096ccb..abb0f4e1682 100644 --- a/.circleci/src/workflows/workflows/contributor-approval.yml +++ b/.circleci/src/workflows/workflows/contributor-approval.yml @@ -8,8 +8,10 @@ when: jobs: - approve-contributor-pr: type: approval - - continuation/continue: - configuration_path: .circleci/workflows.yml - parameters: '{ approved_contributor_pr: true }' # when set to true, the main pull-request workflow will run + - trigger-pull-request-workflow: + steps: + - continuation/continue: + configuration_path: .circleci/workflows.yml + parameters: '{ approved_contributor_pr: true }' # when set to true, the main pull-request workflow will run requires: - approve-contributor-pr diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 3f87cb6ce71..e70ac8e088e 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -3613,11 +3613,13 @@ workflows: jobs: - approve-contributor-pr: type: approval - - continuation/continue: - configuration_path: .circleci/workflows.yml - parameters: '{ approved_contributor_pr: true }' + - trigger-pull-request-workflow: requires: - approve-contributor-pr + steps: + - configuration_path: .circleci/workflows.yml + continuation/continue: null + parameters: '{ approved_contributor_pr: true }' when: matches: pattern: /^pull\/[0-9]+/ From 16fed75846532ae66e4cfbc186ad5b3b321c0018 Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Fri, 12 Sep 2025 13:30:21 -0400 Subject: [PATCH 12/26] try using continuation orb as a job step --- .../jobs/trigger-pull-request-workflow.yml | 7 ++++++ .../workflows/contributor-approval.yml | 12 +++++----- .circleci/workflows.yml | 22 +++++++++++++------ 3 files changed, 27 insertions(+), 14 deletions(-) create mode 100644 .circleci/src/workflows/jobs/trigger-pull-request-workflow.yml diff --git a/.circleci/src/workflows/jobs/trigger-pull-request-workflow.yml b/.circleci/src/workflows/jobs/trigger-pull-request-workflow.yml new file mode 100644 index 00000000000..9a177cff4db --- /dev/null +++ b/.circleci/src/workflows/jobs/trigger-pull-request-workflow.yml @@ -0,0 +1,7 @@ +resource_class: small +docker: + - image: cimg/node:current +steps: + - continuation/continue: + configuration_path: .circleci/workflows.yml + parameters: '{ approved_contributor_pr: true }' # when set to true, the main pull-request workflow will run diff --git a/.circleci/src/workflows/workflows/contributor-approval.yml b/.circleci/src/workflows/workflows/contributor-approval.yml index abb0f4e1682..80dafee9b7e 100644 --- a/.circleci/src/workflows/workflows/contributor-approval.yml +++ b/.circleci/src/workflows/workflows/contributor-approval.yml @@ -1,17 +1,15 @@ # Contributor / Forked PRs have a branch name that starts with "pull/" followed by the PR number when: - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> + and: + - matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> + - equal: [ << pipeline.parameters.approved_contributor_pr >>, false ] jobs: - approve-contributor-pr: type: approval - trigger-pull-request-workflow: - steps: - - continuation/continue: - configuration_path: .circleci/workflows.yml - parameters: '{ approved_contributor_pr: true }' # when set to true, the main pull-request workflow will run requires: - approve-contributor-pr diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index e70ac8e088e..668fb3078ba 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -3374,6 +3374,14 @@ jobs: name: Test types clash ⚔️ working_directory: <> working_directory: ~/cypress + trigger-pull-request-workflow: + docker: + - image: cimg/node:current + resource_class: small + steps: + - continuation/continue: + configuration_path: .circleci/workflows.yml + parameters: '{ approved_contributor_pr: true }' unit-tests: environment: CIRCLE_ARTIFACTS: /tmp/artifacts @@ -3616,14 +3624,14 @@ workflows: - trigger-pull-request-workflow: requires: - approve-contributor-pr - steps: - - configuration_path: .circleci/workflows.yml - continuation/continue: null - parameters: '{ approved_contributor_pr: true }' when: - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> + and: + - matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> + - equal: + - << pipeline.parameters.approved_contributor_pr >> + - false darwin-arm64: jobs: - node_modules_install: From 5994fbba2bacb2e0020fed324b1e7040921b0bdf Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Fri, 12 Sep 2025 13:54:21 -0400 Subject: [PATCH 13/26] move contributor pr approval to the setup config --- .circleci/config.yml | 20 ++++++++++++++-- .../jobs/trigger-main-workflow.yml} | 2 +- .../src/config/jobs/verify-ci-should-run.yml | 2 -- .../src/config/workflows/setup-workflow.yml | 12 +++++++++- .../workflows/contributor-approval.yml | 15 ------------ .circleci/workflows.yml | 23 ------------------- 6 files changed, 30 insertions(+), 44 deletions(-) rename .circleci/src/{workflows/jobs/trigger-pull-request-workflow.yml => config/jobs/trigger-main-workflow.yml} (55%) delete mode 100644 .circleci/src/workflows/workflows/contributor-approval.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index c4819e76b0b..0cdd4cc27b3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,4 +1,12 @@ jobs: + trigger-main-workflow: + docker: + - image: cimg/node:current + resource_class: small + steps: + - continuation/continue: + configuration_path: .circleci/workflows.yml + parameters: '{ approved_contributor_pr: true >> }' verify-ci-should-run: docker: - image: cimg/node:current @@ -47,8 +55,6 @@ jobs: cancel_build name: Verify CI should run - checkout - - continuation/continue: - configuration_path: .circleci/workflows.yml orbs: continuation: circleci/continuation@1.1.0 setup: true @@ -57,4 +63,14 @@ workflows: setup-workflow: jobs: - verify-ci-should-run + - approve-contributor-pr: + type: approval + when: + matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> + - trigger-main-workflow: + requires: + - approve-contributor-pr + - verify-ci-should-run diff --git a/.circleci/src/workflows/jobs/trigger-pull-request-workflow.yml b/.circleci/src/config/jobs/trigger-main-workflow.yml similarity index 55% rename from .circleci/src/workflows/jobs/trigger-pull-request-workflow.yml rename to .circleci/src/config/jobs/trigger-main-workflow.yml index 9a177cff4db..9eb92d3a29b 100644 --- a/.circleci/src/workflows/jobs/trigger-pull-request-workflow.yml +++ b/.circleci/src/config/jobs/trigger-main-workflow.yml @@ -4,4 +4,4 @@ docker: steps: - continuation/continue: configuration_path: .circleci/workflows.yml - parameters: '{ approved_contributor_pr: true }' # when set to true, the main pull-request workflow will run + parameters: '{ approved_contributor_pr: true >> }' diff --git a/.circleci/src/config/jobs/verify-ci-should-run.yml b/.circleci/src/config/jobs/verify-ci-should-run.yml index e037876c090..f79b68f4449 100644 --- a/.circleci/src/config/jobs/verify-ci-should-run.yml +++ b/.circleci/src/config/jobs/verify-ci-should-run.yml @@ -45,5 +45,3 @@ steps: echo "Skipping CI; branch in progress - $TRIGGER_INSTRUCTIONS" cancel_build - checkout - - continuation/continue: - configuration_path: .circleci/workflows.yml \ No newline at end of file diff --git a/.circleci/src/config/workflows/setup-workflow.yml b/.circleci/src/config/workflows/setup-workflow.yml index c0a30f2c072..e43c0a9b322 100644 --- a/.circleci/src/config/workflows/setup-workflow.yml +++ b/.circleci/src/config/workflows/setup-workflow.yml @@ -1,2 +1,12 @@ jobs: - - verify-ci-should-run \ No newline at end of file + - verify-ci-should-run + - approve-contributor-pr: + type: approval + when: + matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> + - trigger-main-workflow: + requires: + - approve-contributor-pr + - verify-ci-should-run diff --git a/.circleci/src/workflows/workflows/contributor-approval.yml b/.circleci/src/workflows/workflows/contributor-approval.yml deleted file mode 100644 index 80dafee9b7e..00000000000 --- a/.circleci/src/workflows/workflows/contributor-approval.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Contributor / Forked PRs have a branch name that starts with "pull/" followed by the PR number - -when: - and: - - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> - - equal: [ << pipeline.parameters.approved_contributor_pr >>, false ] - -jobs: - - approve-contributor-pr: - type: approval - - trigger-pull-request-workflow: - requires: - - approve-contributor-pr diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 668fb3078ba..d962e4088b5 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -3374,14 +3374,6 @@ jobs: name: Test types clash ⚔️ working_directory: <> working_directory: ~/cypress - trigger-pull-request-workflow: - docker: - - image: cimg/node:current - resource_class: small - steps: - - continuation/continue: - configuration_path: .circleci/workflows.yml - parameters: '{ approved_contributor_pr: true }' unit-tests: environment: CIRCLE_ARTIFACTS: /tmp/artifacts @@ -3617,21 +3609,6 @@ parameters: type: boolean version: 2.1 workflows: - contributor-approval: - jobs: - - approve-contributor-pr: - type: approval - - trigger-pull-request-workflow: - requires: - - approve-contributor-pr - when: - and: - - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> - - equal: - - << pipeline.parameters.approved_contributor_pr >> - - false darwin-arm64: jobs: - node_modules_install: From 6a4c5efd5b6d51780eb2e709d2ba17689f7be9a1 Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Fri, 12 Sep 2025 13:59:34 -0400 Subject: [PATCH 14/26] fix parameters --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0cdd4cc27b3..80edec91ec3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ jobs: steps: - continuation/continue: configuration_path: .circleci/workflows.yml - parameters: '{ approved_contributor_pr: true >> }' + parameters: '{ approved_contributor_pr: true }' verify-ci-should-run: docker: - image: cimg/node:current From 3d9e48e66da569f8d18ce5dccaa79b25ce208bb3 Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Fri, 12 Sep 2025 14:01:44 -0400 Subject: [PATCH 15/26] json? --- .circleci/config.yml | 3 +-- .circleci/src/config/jobs/verify-ci-should-run.yml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 80edec91ec3..d1951af21e3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ jobs: steps: - continuation/continue: configuration_path: .circleci/workflows.yml - parameters: '{ approved_contributor_pr: true }' + parameters: '{ approved_contributor_pr: true >> }' verify-ci-should-run: docker: - image: cimg/node:current @@ -54,7 +54,6 @@ jobs: echo "Skipping CI; branch in progress - $TRIGGER_INSTRUCTIONS" cancel_build name: Verify CI should run - - checkout orbs: continuation: circleci/continuation@1.1.0 setup: true diff --git a/.circleci/src/config/jobs/verify-ci-should-run.yml b/.circleci/src/config/jobs/verify-ci-should-run.yml index f79b68f4449..68737d4f9bb 100644 --- a/.circleci/src/config/jobs/verify-ci-should-run.yml +++ b/.circleci/src/config/jobs/verify-ci-should-run.yml @@ -44,4 +44,4 @@ steps: echo "Skipping CI; branch in progress - $TRIGGER_INSTRUCTIONS" cancel_build - - checkout + From c69fd34cecf8792402981237bfdc230e76e5ecee Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Fri, 12 Sep 2025 14:02:03 -0400 Subject: [PATCH 16/26] json? --- .circleci/config.yml | 2 +- .circleci/src/config/jobs/trigger-main-workflow.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d1951af21e3..25fdc576478 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ jobs: steps: - continuation/continue: configuration_path: .circleci/workflows.yml - parameters: '{ approved_contributor_pr: true >> }' + parameters: '{ "approved_contributor_pr": true }' verify-ci-should-run: docker: - image: cimg/node:current diff --git a/.circleci/src/config/jobs/trigger-main-workflow.yml b/.circleci/src/config/jobs/trigger-main-workflow.yml index 9eb92d3a29b..0ed2a0d0665 100644 --- a/.circleci/src/config/jobs/trigger-main-workflow.yml +++ b/.circleci/src/config/jobs/trigger-main-workflow.yml @@ -4,4 +4,4 @@ docker: steps: - continuation/continue: configuration_path: .circleci/workflows.yml - parameters: '{ approved_contributor_pr: true >> }' + parameters: '{ "approved_contributor_pr": true }' From 93414f9155561bdbfee568d9d539fc12c73e7188 Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Fri, 12 Sep 2025 14:05:48 -0400 Subject: [PATCH 17/26] need to check out to be able to pass config path to continuation --- .circleci/config.yml | 1 + .circleci/src/config/jobs/trigger-main-workflow.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 25fdc576478..ae63a2d2105 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,6 +4,7 @@ jobs: - image: cimg/node:current resource_class: small steps: + - checkout - continuation/continue: configuration_path: .circleci/workflows.yml parameters: '{ "approved_contributor_pr": true }' diff --git a/.circleci/src/config/jobs/trigger-main-workflow.yml b/.circleci/src/config/jobs/trigger-main-workflow.yml index 0ed2a0d0665..e3489589264 100644 --- a/.circleci/src/config/jobs/trigger-main-workflow.yml +++ b/.circleci/src/config/jobs/trigger-main-workflow.yml @@ -2,6 +2,7 @@ resource_class: small docker: - image: cimg/node:current steps: + - checkout - continuation/continue: configuration_path: .circleci/workflows.yml parameters: '{ "approved_contributor_pr": true }' From a5a9550eacaa468acc34824bc5d9e456dbf230ef Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Fri, 12 Sep 2025 14:39:20 -0400 Subject: [PATCH 18/26] use dynamic config to be able to lint etc contributor prs before approval --- .circleci/config.yml | 30 +++- .../src/config/jobs/trigger-main-workflow.yml | 6 +- .../workflows/setup-contributor-workflow.yml | 10 ++ .../src/config/workflows/setup-workflow.yml | 13 +- .circleci/src/workflows/@workflows.yml | 2 +- .../src/workflows/workflows/pull-request.yml | 140 ++++++++++------- .circleci/workflows.yml | 146 ++++++++++-------- 7 files changed, 214 insertions(+), 133 deletions(-) create mode 100644 .circleci/src/config/workflows/setup-contributor-workflow.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index ae63a2d2105..551ae727066 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,12 +2,16 @@ jobs: trigger-main-workflow: docker: - image: cimg/node:current + parameters: + is_contributor_pr: + default: false + type: boolean resource_class: small steps: - checkout - continuation/continue: configuration_path: .circleci/workflows.yml - parameters: '{ "approved_contributor_pr": true }' + parameters: '{ "is_contributor_pr": << parameters.is_contributor_pr >> }' verify-ci-should-run: docker: - image: cimg/node:current @@ -60,17 +64,27 @@ orbs: setup: true version: 2.1 workflows: + setup-contributor-workflow: + jobs: + - verify-ci-should-run + - trigger-main-workflow: + is_contributor_pr: true + requires: + - verify-ci-should-run + when: + matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> setup-workflow: jobs: - verify-ci-should-run - - approve-contributor-pr: - type: approval - when: - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> - trigger-main-workflow: + is_contributor_pr: false requires: - - approve-contributor-pr - verify-ci-should-run + when: + not: + matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> diff --git a/.circleci/src/config/jobs/trigger-main-workflow.yml b/.circleci/src/config/jobs/trigger-main-workflow.yml index e3489589264..d1e65ce8e35 100644 --- a/.circleci/src/config/jobs/trigger-main-workflow.yml +++ b/.circleci/src/config/jobs/trigger-main-workflow.yml @@ -1,8 +1,12 @@ resource_class: small +parameters: + is_contributor_pr: + type: boolean + default: false docker: - image: cimg/node:current steps: - checkout - continuation/continue: configuration_path: .circleci/workflows.yml - parameters: '{ "approved_contributor_pr": true }' + parameters: '{ "is_contributor_pr": << parameters.is_contributor_pr >> }' diff --git a/.circleci/src/config/workflows/setup-contributor-workflow.yml b/.circleci/src/config/workflows/setup-contributor-workflow.yml new file mode 100644 index 00000000000..40d70c84b89 --- /dev/null +++ b/.circleci/src/config/workflows/setup-contributor-workflow.yml @@ -0,0 +1,10 @@ +when: + matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> +jobs: + - verify-ci-should-run + - trigger-main-workflow: + is_contributor_pr: true + requires: + - verify-ci-should-run diff --git a/.circleci/src/config/workflows/setup-workflow.yml b/.circleci/src/config/workflows/setup-workflow.yml index e43c0a9b322..a17c738d29a 100644 --- a/.circleci/src/config/workflows/setup-workflow.yml +++ b/.circleci/src/config/workflows/setup-workflow.yml @@ -1,12 +1,11 @@ +when: + not: + matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> jobs: - verify-ci-should-run - - approve-contributor-pr: - type: approval - when: - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> - trigger-main-workflow: + is_contributor_pr: false requires: - - approve-contributor-pr - verify-ci-should-run diff --git a/.circleci/src/workflows/@workflows.yml b/.circleci/src/workflows/@workflows.yml index 167ea718ae7..62efc5dca50 100644 --- a/.circleci/src/workflows/@workflows.yml +++ b/.circleci/src/workflows/@workflows.yml @@ -5,7 +5,7 @@ chrome-beta-version: &chrome-beta-version "141.0.7390.16" firefox-stable-version: &firefox-stable-version "142.0" parameters: - approved_contributor_pr: + is_contributor_pr: type: boolean default: false diff --git a/.circleci/src/workflows/workflows/pull-request.yml b/.circleci/src/workflows/workflows/pull-request.yml index 9144434cce2..0e7527b8685 100644 --- a/.circleci/src/workflows/workflows/pull-request.yml +++ b/.circleci/src/workflows/workflows/pull-request.yml @@ -2,27 +2,12 @@ # External PR after approval (approved contributor PR that's not a main branch) # Internal PR for any branch that does is not develop or release/ related when: - or: - - and: - - equal: [ << pipeline.parameters.approved_contributor_pr >>, true ] - - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> - - not: - or: - - equal: [ "develop", << pipeline.git.branch >> ] - - matches: - pattern: /^release\/.*/ - value: << pipeline.git.branch >> - - not: - or: - - equal: [ "develop", << pipeline.git.branch >> ] - - matches: - pattern: /^release\/.*/ - value: << pipeline.git.branch >> - - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> + not: + and: + - equal: [ "develop", << pipeline.git.branch >> ] + - matches: + pattern: /^release\/.*/ + value: << pipeline.git.branch >> jobs: - node_modules_install: @@ -38,68 +23,47 @@ jobs: name: linux-lint requires: - build - - percy-finalize: - context: test-runner:percy - required_env_var: PERCY_TOKEN - requires: - - cli-visual-tests - - reporter-integration-tests - - run-app-component-tests-chrome - - run-app-integration-tests-chrome - - run-frontend-shared-component-tests-chrome - - run-launchpad-component-tests-chrome - - run-launchpad-integration-tests-chrome - - run-reporter-component-tests-chrome - - run-webpack-dev-server-integration-tests - - run-vite-dev-server-integration-tests - # Cypress run must be completed to fetch Accessibility report - - verify-accessibility-results: - context: test-runner:cypress-record-key - requires: - - reporter-integration-tests - - run-app-component-tests-chrome - - run-app-integration-tests-chrome - - run-frontend-shared-component-tests-chrome - - run-launchpad-component-tests-chrome - - run-launchpad-integration-tests-chrome - - run-reporter-component-tests-chrome - - run-webpack-dev-server-integration-tests - - run-vite-dev-server-integration-tests - - driver-integration-tests-firefox - - driver-integration-tests-chrome - - driver-integration-tests-chrome-inject-document-domain - - driver-integration-tests-chrome-beta-inject-document-domain - - driver-integration-tests-electron - - driver-integration-tests-webkit - - driver-integration-memory-tests - lint-types: requires: - build + - approve-contributor-pr: + type: approval + when: + equal: [ << pipeline.parameters.is_contributor_pr >>, true ] + + # The following jobs are only run for contributor PRs once they are approved # unit, integration and e2e tests - cli-visual-tests: context: test-runner:percy requires: - build + - approve-contributor-pr - unit-tests: requires: - build + - approve-contributor-pr - verify-release-readiness: context: test-runner:npm-release requires: - build + - approve-contributor-pr - server-unit-tests: requires: - build + - approve-contributor-pr - server-integration-tests: requires: - build + - approve-contributor-pr - server-performance-tests: requires: - build + - approve-contributor-pr - system-tests-node-modules-install: context: test-runner:performance-tracking requires: - build + - approve-contributor-pr - system-tests-chrome: context: test-runner:performance-tracking requires: @@ -125,33 +89,41 @@ jobs: context: test-runner:cypress-record-key requires: - build + - approve-contributor-pr - driver-integration-tests-chrome-inject-document-domain: context: test-runner:cypress-record-key requires: - build + - approve-contributor-pr - driver-integration-tests-chrome-beta: context: test-runner:cypress-record-key requires: - build + - approve-contributor-pr - driver-integration-tests-chrome-beta-inject-document-domain: context: test-runner:cypress-record-key requires: - build + - approve-contributor-pr - driver-integration-tests-firefox: context: test-runner:cypress-record-key requires: - build + - approve-contributor-pr - driver-integration-tests-electron: context: test-runner:cypress-record-key requires: - build + - approve-contributor-pr - driver-integration-tests-webkit: context: test-runner:cypress-record-key requires: - build + - approve-contributor-pr - driver-integration-memory-tests: requires: - build + - approve-contributor-pr - run-frontend-shared-component-tests-chrome: context: [ @@ -162,6 +134,7 @@ jobs: percy: true requires: - build + - approve-contributor-pr - run-launchpad-integration-tests-chrome: context: [ @@ -172,6 +145,7 @@ jobs: percy: true requires: - build + - approve-contributor-pr - run-launchpad-component-tests-chrome: context: [ @@ -182,6 +156,7 @@ jobs: percy: true requires: - build + - approve-contributor-pr - run-app-integration-tests-chrome: context: [ @@ -192,6 +167,7 @@ jobs: percy: true requires: - build + - approve-contributor-pr - run-webpack-dev-server-integration-tests: context: [ test-runner:cypress-record-key, test-runner:percy ] requires: @@ -210,57 +186,73 @@ jobs: percy: true requires: - build + - approve-contributor-pr - run-reporter-component-tests-chrome: context: [ test-runner:cypress-record-key, test-runner:percy ] percy: true requires: - build + - approve-contributor-pr - reporter-integration-tests: context: [ test-runner:cypress-record-key, test-runner:percy ] requires: - build + - approve-contributor-pr - npm-webpack-dev-server: requires: - system-tests-node-modules-install - npm-vite-dev-server: requires: - build + - approve-contributor-pr - npm-vite-plugin-cypress-esm: requires: - build + - approve-contributor-pr - npm-webpack-preprocessor: requires: - build + - approve-contributor-pr - npm-webpack-batteries-included-preprocessor: requires: - build + - approve-contributor-pr - npm-vue: requires: - build + - approve-contributor-pr - npm-puppeteer-unit-tests: requires: - build + - approve-contributor-pr - npm-puppeteer-cypress-tests: requires: - build + - approve-contributor-pr - npm-react: requires: - build + - approve-contributor-pr - npm-angular: requires: - build + - approve-contributor-pr - npm-mount-utils: requires: - build + - approve-contributor-pr - npm-grep: requires: - build + - approve-contributor-pr - npm-eslint-plugin-dev: requires: - build + - approve-contributor-pr - npm-cypress-schematic: requires: - build + - approve-contributor-pr - v8-integration-tests: requires: - system-tests-node-modules-install @@ -272,6 +264,7 @@ jobs: - publish-binary requires: - node_modules_install + - approve-contributor-pr - wait-for-binary-publish: type: approval requires: @@ -285,6 +278,7 @@ jobs: - test-kitchensink: requires: - build + - approve-contributor-pr - test-npm-module-on-minimum-node-version: context: publish-binary requires: @@ -327,3 +321,39 @@ jobs: requires: - get-published-artifacts - system-tests-node-modules-install + + # Finalization jobs + - percy-finalize: + context: test-runner:percy + required_env_var: PERCY_TOKEN + requires: + - cli-visual-tests + - reporter-integration-tests + - run-app-component-tests-chrome + - run-app-integration-tests-chrome + - run-frontend-shared-component-tests-chrome + - run-launchpad-component-tests-chrome + - run-launchpad-integration-tests-chrome + - run-reporter-component-tests-chrome + - run-webpack-dev-server-integration-tests + - run-vite-dev-server-integration-tests + # Cypress run must be completed to fetch Accessibility report + - verify-accessibility-results: + context: test-runner:cypress-record-key + requires: + - reporter-integration-tests + - run-app-component-tests-chrome + - run-app-integration-tests-chrome + - run-frontend-shared-component-tests-chrome + - run-launchpad-component-tests-chrome + - run-launchpad-integration-tests-chrome + - run-reporter-component-tests-chrome + - run-webpack-dev-server-integration-tests + - run-vite-dev-server-integration-tests + - driver-integration-tests-firefox + - driver-integration-tests-chrome + - driver-integration-tests-chrome-inject-document-domain + - driver-integration-tests-chrome-beta-inject-document-domain + - driver-integration-tests-electron + - driver-integration-tests-webkit + - driver-integration-memory-tests \ No newline at end of file diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index d962e4088b5..b00b4831289 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -3604,7 +3604,7 @@ orbs: browser-tools: circleci/browser-tools@2.1.1 continuation: circleci/continuation@1.1.0 parameters: - approved_contributor_pr: + is_contributor_pr: default: false type: boolean version: 2.1 @@ -4282,66 +4282,46 @@ workflows: name: linux-lint requires: - build - - percy-finalize: - context: test-runner:percy - required_env_var: PERCY_TOKEN - requires: - - cli-visual-tests - - reporter-integration-tests - - run-app-component-tests-chrome - - run-app-integration-tests-chrome - - run-frontend-shared-component-tests-chrome - - run-launchpad-component-tests-chrome - - run-launchpad-integration-tests-chrome - - run-reporter-component-tests-chrome - - run-webpack-dev-server-integration-tests - - run-vite-dev-server-integration-tests - - verify-accessibility-results: - context: test-runner:cypress-record-key - requires: - - reporter-integration-tests - - run-app-component-tests-chrome - - run-app-integration-tests-chrome - - run-frontend-shared-component-tests-chrome - - run-launchpad-component-tests-chrome - - run-launchpad-integration-tests-chrome - - run-reporter-component-tests-chrome - - run-webpack-dev-server-integration-tests - - run-vite-dev-server-integration-tests - - driver-integration-tests-firefox - - driver-integration-tests-chrome - - driver-integration-tests-chrome-inject-document-domain - - driver-integration-tests-chrome-beta-inject-document-domain - - driver-integration-tests-electron - - driver-integration-tests-webkit - - driver-integration-memory-tests - lint-types: requires: - build + - approve-contributor-pr: + type: approval + when: + equal: + - << pipeline.parameters.is_contributor_pr >> + - true - cli-visual-tests: context: test-runner:percy requires: - build + - approve-contributor-pr - unit-tests: requires: - build + - approve-contributor-pr - verify-release-readiness: context: test-runner:npm-release requires: - build + - approve-contributor-pr - server-unit-tests: requires: - build + - approve-contributor-pr - server-integration-tests: requires: - build + - approve-contributor-pr - server-performance-tests: requires: - build + - approve-contributor-pr - system-tests-node-modules-install: context: test-runner:performance-tracking requires: - build + - approve-contributor-pr - system-tests-chrome: context: test-runner:performance-tracking requires: @@ -4367,33 +4347,41 @@ workflows: context: test-runner:cypress-record-key requires: - build + - approve-contributor-pr - driver-integration-tests-chrome-inject-document-domain: context: test-runner:cypress-record-key requires: - build + - approve-contributor-pr - driver-integration-tests-chrome-beta: context: test-runner:cypress-record-key requires: - build + - approve-contributor-pr - driver-integration-tests-chrome-beta-inject-document-domain: context: test-runner:cypress-record-key requires: - build + - approve-contributor-pr - driver-integration-tests-firefox: context: test-runner:cypress-record-key requires: - build + - approve-contributor-pr - driver-integration-tests-electron: context: test-runner:cypress-record-key requires: - build + - approve-contributor-pr - driver-integration-tests-webkit: context: test-runner:cypress-record-key requires: - build + - approve-contributor-pr - driver-integration-memory-tests: requires: - build + - approve-contributor-pr - run-frontend-shared-component-tests-chrome: context: - test-runner:cypress-record-key @@ -4402,6 +4390,7 @@ workflows: percy: true requires: - build + - approve-contributor-pr - run-launchpad-integration-tests-chrome: context: - test-runner:cypress-record-key @@ -4410,6 +4399,7 @@ workflows: percy: true requires: - build + - approve-contributor-pr - run-launchpad-component-tests-chrome: context: - test-runner:cypress-record-key @@ -4418,6 +4408,7 @@ workflows: percy: true requires: - build + - approve-contributor-pr - run-app-integration-tests-chrome: context: - test-runner:cypress-record-key @@ -4426,6 +4417,7 @@ workflows: percy: true requires: - build + - approve-contributor-pr - run-webpack-dev-server-integration-tests: context: - test-runner:cypress-record-key @@ -4446,6 +4438,7 @@ workflows: percy: true requires: - build + - approve-contributor-pr - run-reporter-component-tests-chrome: context: - test-runner:cypress-record-key @@ -4453,54 +4446,69 @@ workflows: percy: true requires: - build + - approve-contributor-pr - reporter-integration-tests: context: - test-runner:cypress-record-key - test-runner:percy requires: - build + - approve-contributor-pr - npm-webpack-dev-server: requires: - system-tests-node-modules-install - npm-vite-dev-server: requires: - build + - approve-contributor-pr - npm-vite-plugin-cypress-esm: requires: - build + - approve-contributor-pr - npm-webpack-preprocessor: requires: - build + - approve-contributor-pr - npm-webpack-batteries-included-preprocessor: requires: - build + - approve-contributor-pr - npm-vue: requires: - build + - approve-contributor-pr - npm-puppeteer-unit-tests: requires: - build + - approve-contributor-pr - npm-puppeteer-cypress-tests: requires: - build + - approve-contributor-pr - npm-react: requires: - build + - approve-contributor-pr - npm-angular: requires: - build + - approve-contributor-pr - npm-mount-utils: requires: - build + - approve-contributor-pr - npm-grep: requires: - build + - approve-contributor-pr - npm-eslint-plugin-dev: requires: - build + - approve-contributor-pr - npm-cypress-schematic: requires: - build + - approve-contributor-pr - v8-integration-tests: requires: - system-tests-node-modules-install @@ -4511,6 +4519,7 @@ workflows: - publish-binary requires: - node_modules_install + - approve-contributor-pr - wait-for-binary-publish: requires: - create-and-trigger-packaging-artifacts @@ -4524,6 +4533,7 @@ workflows: - test-kitchensink: requires: - build + - approve-contributor-pr - test-npm-module-on-minimum-node-version: context: publish-binary requires: @@ -4566,34 +4576,48 @@ workflows: requires: - get-published-artifacts - system-tests-node-modules-install + - percy-finalize: + context: test-runner:percy + required_env_var: PERCY_TOKEN + requires: + - cli-visual-tests + - reporter-integration-tests + - run-app-component-tests-chrome + - run-app-integration-tests-chrome + - run-frontend-shared-component-tests-chrome + - run-launchpad-component-tests-chrome + - run-launchpad-integration-tests-chrome + - run-reporter-component-tests-chrome + - run-webpack-dev-server-integration-tests + - run-vite-dev-server-integration-tests + - verify-accessibility-results: + context: test-runner:cypress-record-key + requires: + - reporter-integration-tests + - run-app-component-tests-chrome + - run-app-integration-tests-chrome + - run-frontend-shared-component-tests-chrome + - run-launchpad-component-tests-chrome + - run-launchpad-integration-tests-chrome + - run-reporter-component-tests-chrome + - run-webpack-dev-server-integration-tests + - run-vite-dev-server-integration-tests + - driver-integration-tests-firefox + - driver-integration-tests-chrome + - driver-integration-tests-chrome-inject-document-domain + - driver-integration-tests-chrome-beta-inject-document-domain + - driver-integration-tests-electron + - driver-integration-tests-webkit + - driver-integration-memory-tests when: - or: - - and: - - equal: - - << pipeline.parameters.approved_contributor_pr >> - - true - - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> - - not: - or: - - equal: - - develop - - << pipeline.git.branch >> - - matches: - pattern: /^release\/.*/ - value: << pipeline.git.branch >> - - not: - or: - - equal: - - develop - - << pipeline.git.branch >> - - matches: - pattern: /^release\/.*/ - value: << pipeline.git.branch >> - - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> + not: + and: + - equal: + - develop + - << pipeline.git.branch >> + - matches: + pattern: /^release\/.*/ + value: << pipeline.git.branch >> windows: jobs: - node_modules_install: From 6a80e066d642c83c5574e40bc8c47d4afcd7545d Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Fri, 12 Sep 2025 14:51:44 -0400 Subject: [PATCH 19/26] maybe if parameter is direct? --- .circleci/src/workflows/workflows/pull-request.yml | 3 +-- .circleci/workflows.yml | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.circleci/src/workflows/workflows/pull-request.yml b/.circleci/src/workflows/workflows/pull-request.yml index 0e7527b8685..699d9d3ab9d 100644 --- a/.circleci/src/workflows/workflows/pull-request.yml +++ b/.circleci/src/workflows/workflows/pull-request.yml @@ -28,8 +28,7 @@ jobs: - build - approve-contributor-pr: type: approval - when: - equal: [ << pipeline.parameters.is_contributor_pr >>, true ] + when: << pipeline.parameters.is_contributor_pr >> # The following jobs are only run for contributor PRs once they are approved # unit, integration and e2e tests diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index b00b4831289..d6083083d68 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -4287,10 +4287,7 @@ workflows: - build - approve-contributor-pr: type: approval - when: - equal: - - << pipeline.parameters.is_contributor_pr >> - - true + when: << pipeline.parameters.is_contributor_pr >> - cli-visual-tests: context: test-runner:percy requires: From 0875fe7eb7a68bd8968dba5ad981a2733b212c44 Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Fri, 12 Sep 2025 14:55:26 -0400 Subject: [PATCH 20/26] debug? --- .circleci/src/workflows/jobs/debug.yml | 11 +++++++++++ .circleci/src/workflows/workflows/pull-request.yml | 2 ++ .circleci/workflows.yml | 13 +++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 .circleci/src/workflows/jobs/debug.yml diff --git a/.circleci/src/workflows/jobs/debug.yml b/.circleci/src/workflows/jobs/debug.yml new file mode 100644 index 00000000000..55a5617d18b --- /dev/null +++ b/.circleci/src/workflows/jobs/debug.yml @@ -0,0 +1,11 @@ +resource_class: small +docker: + - image: cimg/node:current +parameters: + is_contributor_pr: + type: boolean + default: false +steps: + - run: + command: | + echo "is_contributor_pr: << parameters.is_contributor_pr >>" \ No newline at end of file diff --git a/.circleci/src/workflows/workflows/pull-request.yml b/.circleci/src/workflows/workflows/pull-request.yml index 699d9d3ab9d..8a0f3c0897e 100644 --- a/.circleci/src/workflows/workflows/pull-request.yml +++ b/.circleci/src/workflows/workflows/pull-request.yml @@ -10,6 +10,8 @@ when: value: << pipeline.git.branch >> jobs: + - debug: + is_contributor_pr: << pipeline.parameters.is_contributor_pr >> - node_modules_install: build-better-sqlite3: true - build: diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index d6083083d68..a65af24180f 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -1567,6 +1567,17 @@ jobs: - upload-build-artifacts - post-install-comment working_directory: ~/cypress + debug: + docker: + - image: cimg/node:current + parameters: + is_contributor_pr: + default: false + type: boolean + resource_class: small + steps: + - run: + command: 'echo "is_contributor_pr: << parameters.is_contributor_pr >>"' driver-integration-memory-tests: environment: CIRCLE_ARTIFACTS: /tmp/artifacts @@ -4269,6 +4280,8 @@ workflows: value: << pipeline.git.branch >> pull-request: jobs: + - debug: + is_contributor_pr: << pipeline.parameters.is_contributor_pr >> - node_modules_install: build-better-sqlite3: true - build: From d4401f34ccb0fee63f300f1e38d0e162a0d226b9 Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Fri, 12 Sep 2025 15:38:17 -0400 Subject: [PATCH 21/26] auto-approve contributor gate when launched as an internal pr --- .../workflows/jobs/approve-contributor-pr.yml | 1 + .../workflows/jobs/approve-internal-pr.yml | 25 +++++++++++++ .../src/workflows/workflows/pull-request.yml | 8 ++--- .circleci/workflows.yml | 35 +++++++++++++++++-- 4 files changed, 62 insertions(+), 7 deletions(-) create mode 100644 .circleci/src/workflows/jobs/approve-contributor-pr.yml create mode 100644 .circleci/src/workflows/jobs/approve-internal-pr.yml diff --git a/.circleci/src/workflows/jobs/approve-contributor-pr.yml b/.circleci/src/workflows/jobs/approve-contributor-pr.yml new file mode 100644 index 00000000000..54af71e3308 --- /dev/null +++ b/.circleci/src/workflows/jobs/approve-contributor-pr.yml @@ -0,0 +1 @@ +type: approval diff --git a/.circleci/src/workflows/jobs/approve-internal-pr.yml b/.circleci/src/workflows/jobs/approve-internal-pr.yml new file mode 100644 index 00000000000..ebc6bfc8405 --- /dev/null +++ b/.circleci/src/workflows/jobs/approve-internal-pr.yml @@ -0,0 +1,25 @@ +resource_class: small +docker: + - image: cimg/node:current +steps: + - run: + name: Internal PR - Run Approved + command: | + if [ << pipeline.parameters.is_contributor_pr >> ]; then + echo "External PR - manual approval required." + exit 0 + fi + + # Get all jobs in the current workflow + curl -H "Circle-Token: $CIRCLE_TOKEN" \ + "https://circleci.com/api/v2/workflow/$CIRCLE_WORKFLOW_ID/job" + + # Parse the response to find the approve-contributor-pr job ID + JOB_ID=$(curl -s -H "Circle-Token: $CIRCLE_TOKEN" \ + "https://circleci.com/api/v2/workflow/$CIRCLE_WORKFLOW_ID/job" | \ + jq -r '.items[] | select(.name == "approve-contributor-pr") | .id') + + # Then approve it + curl -X POST \ + -H "Circle-Token: $CIRCLE_TOKEN" \ + "https://circleci.com/api/v2/workflow/$CIRCLE_WORKFLOW_ID/approve/$JOB_ID" diff --git a/.circleci/src/workflows/workflows/pull-request.yml b/.circleci/src/workflows/workflows/pull-request.yml index 8a0f3c0897e..968ba0533f6 100644 --- a/.circleci/src/workflows/workflows/pull-request.yml +++ b/.circleci/src/workflows/workflows/pull-request.yml @@ -28,10 +28,10 @@ jobs: - lint-types: requires: - build - - approve-contributor-pr: - type: approval - when: << pipeline.parameters.is_contributor_pr >> - + - approve-contributor-pr + - approve-internal-pr: + requires: + - approve-contributor-pr # The following jobs are only run for contributor PRs once they are approved # unit, integration and e2e tests - cli-visual-tests: diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index a65af24180f..12bfc825d4f 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -1374,6 +1374,34 @@ executors: resource_class: windows.large firefox-stable-version: "142.0" jobs: + approve-contributor-pr: + type: approval + approve-internal-pr: + docker: + - image: cimg/node:current + resource_class: small + steps: + - run: + command: | + if [ << pipeline.parameters.is_contributor_pr >> ]; then + echo "External PR - manual approval required." + exit 0 + fi + + # Get all jobs in the current workflow + curl -H "Circle-Token: $CIRCLE_TOKEN" \ + "https://circleci.com/api/v2/workflow/$CIRCLE_WORKFLOW_ID/job" + + # Parse the response to find the approve-contributor-pr job ID + JOB_ID=$(curl -s -H "Circle-Token: $CIRCLE_TOKEN" \ + "https://circleci.com/api/v2/workflow/$CIRCLE_WORKFLOW_ID/job" | \ + jq -r '.items[] | select(.name == "approve-contributor-pr") | .id') + + # Then approve it + curl -X POST \ + -H "Circle-Token: $CIRCLE_TOKEN" \ + "https://circleci.com/api/v2/workflow/$CIRCLE_WORKFLOW_ID/approve/$JOB_ID" + name: Internal PR - Run Approved binary-system-tests: environment: CIRCLE_ARTIFACTS: /tmp/artifacts @@ -4298,9 +4326,10 @@ workflows: - lint-types: requires: - build - - approve-contributor-pr: - type: approval - when: << pipeline.parameters.is_contributor_pr >> + - approve-contributor-pr + - approve-internal-pr: + requires: + - approve-contributor-pr - cli-visual-tests: context: test-runner:percy requires: From e873b0de49fbade6803475608cb163d6797361e2 Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Fri, 12 Sep 2025 15:53:05 -0400 Subject: [PATCH 22/26] vastly simplify, use job filter --- .circleci/config.yml | 22 -------- .../src/config/jobs/trigger-main-workflow.yml | 5 -- .../workflows/setup-contributor-workflow.yml | 10 ---- .../src/config/workflows/setup-workflow.yml | 6 -- .circleci/src/workflows/@workflows.yml | 6 -- .../workflows/jobs/approve-contributor-pr.yml | 1 - .../workflows/jobs/approve-internal-pr.yml | 25 --------- .circleci/src/workflows/jobs/debug.yml | 11 ---- .../src/workflows/workflows/pull-request.yml | 12 ++-- .circleci/workflows.yml | 55 ++----------------- 10 files changed, 11 insertions(+), 142 deletions(-) delete mode 100644 .circleci/src/config/workflows/setup-contributor-workflow.yml delete mode 100644 .circleci/src/workflows/jobs/approve-contributor-pr.yml delete mode 100644 .circleci/src/workflows/jobs/approve-internal-pr.yml delete mode 100644 .circleci/src/workflows/jobs/debug.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index 551ae727066..57749aa1ed2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,16 +2,11 @@ jobs: trigger-main-workflow: docker: - image: cimg/node:current - parameters: - is_contributor_pr: - default: false - type: boolean resource_class: small steps: - checkout - continuation/continue: configuration_path: .circleci/workflows.yml - parameters: '{ "is_contributor_pr": << parameters.is_contributor_pr >> }' verify-ci-should-run: docker: - image: cimg/node:current @@ -64,27 +59,10 @@ orbs: setup: true version: 2.1 workflows: - setup-contributor-workflow: - jobs: - - verify-ci-should-run - - trigger-main-workflow: - is_contributor_pr: true - requires: - - verify-ci-should-run - when: - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> setup-workflow: jobs: - verify-ci-should-run - trigger-main-workflow: - is_contributor_pr: false requires: - verify-ci-should-run - when: - not: - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> diff --git a/.circleci/src/config/jobs/trigger-main-workflow.yml b/.circleci/src/config/jobs/trigger-main-workflow.yml index d1e65ce8e35..d4e922ad84a 100644 --- a/.circleci/src/config/jobs/trigger-main-workflow.yml +++ b/.circleci/src/config/jobs/trigger-main-workflow.yml @@ -1,12 +1,7 @@ resource_class: small -parameters: - is_contributor_pr: - type: boolean - default: false docker: - image: cimg/node:current steps: - checkout - continuation/continue: configuration_path: .circleci/workflows.yml - parameters: '{ "is_contributor_pr": << parameters.is_contributor_pr >> }' diff --git a/.circleci/src/config/workflows/setup-contributor-workflow.yml b/.circleci/src/config/workflows/setup-contributor-workflow.yml deleted file mode 100644 index 40d70c84b89..00000000000 --- a/.circleci/src/config/workflows/setup-contributor-workflow.yml +++ /dev/null @@ -1,10 +0,0 @@ -when: - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> -jobs: - - verify-ci-should-run - - trigger-main-workflow: - is_contributor_pr: true - requires: - - verify-ci-should-run diff --git a/.circleci/src/config/workflows/setup-workflow.yml b/.circleci/src/config/workflows/setup-workflow.yml index a17c738d29a..bcf613ca973 100644 --- a/.circleci/src/config/workflows/setup-workflow.yml +++ b/.circleci/src/config/workflows/setup-workflow.yml @@ -1,11 +1,5 @@ -when: - not: - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> jobs: - verify-ci-should-run - trigger-main-workflow: - is_contributor_pr: false requires: - verify-ci-should-run diff --git a/.circleci/src/workflows/@workflows.yml b/.circleci/src/workflows/@workflows.yml index 62efc5dca50..b5ce080530a 100644 --- a/.circleci/src/workflows/@workflows.yml +++ b/.circleci/src/workflows/@workflows.yml @@ -4,14 +4,8 @@ chrome-stable-version: &chrome-stable-version "140.0.7339.127" chrome-beta-version: &chrome-beta-version "141.0.7390.16" firefox-stable-version: &firefox-stable-version "142.0" -parameters: - is_contributor_pr: - type: boolean - default: false - orbs: browser-tools: circleci/browser-tools@2.1.1 - continuation: circleci/continuation@1.1.0 defaults: &defaults parallelism: 1 diff --git a/.circleci/src/workflows/jobs/approve-contributor-pr.yml b/.circleci/src/workflows/jobs/approve-contributor-pr.yml deleted file mode 100644 index 54af71e3308..00000000000 --- a/.circleci/src/workflows/jobs/approve-contributor-pr.yml +++ /dev/null @@ -1 +0,0 @@ -type: approval diff --git a/.circleci/src/workflows/jobs/approve-internal-pr.yml b/.circleci/src/workflows/jobs/approve-internal-pr.yml deleted file mode 100644 index ebc6bfc8405..00000000000 --- a/.circleci/src/workflows/jobs/approve-internal-pr.yml +++ /dev/null @@ -1,25 +0,0 @@ -resource_class: small -docker: - - image: cimg/node:current -steps: - - run: - name: Internal PR - Run Approved - command: | - if [ << pipeline.parameters.is_contributor_pr >> ]; then - echo "External PR - manual approval required." - exit 0 - fi - - # Get all jobs in the current workflow - curl -H "Circle-Token: $CIRCLE_TOKEN" \ - "https://circleci.com/api/v2/workflow/$CIRCLE_WORKFLOW_ID/job" - - # Parse the response to find the approve-contributor-pr job ID - JOB_ID=$(curl -s -H "Circle-Token: $CIRCLE_TOKEN" \ - "https://circleci.com/api/v2/workflow/$CIRCLE_WORKFLOW_ID/job" | \ - jq -r '.items[] | select(.name == "approve-contributor-pr") | .id') - - # Then approve it - curl -X POST \ - -H "Circle-Token: $CIRCLE_TOKEN" \ - "https://circleci.com/api/v2/workflow/$CIRCLE_WORKFLOW_ID/approve/$JOB_ID" diff --git a/.circleci/src/workflows/jobs/debug.yml b/.circleci/src/workflows/jobs/debug.yml deleted file mode 100644 index 55a5617d18b..00000000000 --- a/.circleci/src/workflows/jobs/debug.yml +++ /dev/null @@ -1,11 +0,0 @@ -resource_class: small -docker: - - image: cimg/node:current -parameters: - is_contributor_pr: - type: boolean - default: false -steps: - - run: - command: | - echo "is_contributor_pr: << parameters.is_contributor_pr >>" \ No newline at end of file diff --git a/.circleci/src/workflows/workflows/pull-request.yml b/.circleci/src/workflows/workflows/pull-request.yml index 968ba0533f6..fecd3d56ca4 100644 --- a/.circleci/src/workflows/workflows/pull-request.yml +++ b/.circleci/src/workflows/workflows/pull-request.yml @@ -10,8 +10,6 @@ when: value: << pipeline.git.branch >> jobs: - - debug: - is_contributor_pr: << pipeline.parameters.is_contributor_pr >> - node_modules_install: build-better-sqlite3: true - build: @@ -28,10 +26,12 @@ jobs: - lint-types: requires: - build - - approve-contributor-pr - - approve-internal-pr: - requires: - - approve-contributor-pr + - approve-contributor-pr: + type: approval + filters: + branches: + only: /^pull\/[0-9]+/ + # The following jobs are only run for contributor PRs once they are approved # unit, integration and e2e tests - cli-visual-tests: diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 12bfc825d4f..9d2705c46be 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -1374,34 +1374,6 @@ executors: resource_class: windows.large firefox-stable-version: "142.0" jobs: - approve-contributor-pr: - type: approval - approve-internal-pr: - docker: - - image: cimg/node:current - resource_class: small - steps: - - run: - command: | - if [ << pipeline.parameters.is_contributor_pr >> ]; then - echo "External PR - manual approval required." - exit 0 - fi - - # Get all jobs in the current workflow - curl -H "Circle-Token: $CIRCLE_TOKEN" \ - "https://circleci.com/api/v2/workflow/$CIRCLE_WORKFLOW_ID/job" - - # Parse the response to find the approve-contributor-pr job ID - JOB_ID=$(curl -s -H "Circle-Token: $CIRCLE_TOKEN" \ - "https://circleci.com/api/v2/workflow/$CIRCLE_WORKFLOW_ID/job" | \ - jq -r '.items[] | select(.name == "approve-contributor-pr") | .id') - - # Then approve it - curl -X POST \ - -H "Circle-Token: $CIRCLE_TOKEN" \ - "https://circleci.com/api/v2/workflow/$CIRCLE_WORKFLOW_ID/approve/$JOB_ID" - name: Internal PR - Run Approved binary-system-tests: environment: CIRCLE_ARTIFACTS: /tmp/artifacts @@ -1595,17 +1567,6 @@ jobs: - upload-build-artifacts - post-install-comment working_directory: ~/cypress - debug: - docker: - - image: cimg/node:current - parameters: - is_contributor_pr: - default: false - type: boolean - resource_class: small - steps: - - run: - command: 'echo "is_contributor_pr: << parameters.is_contributor_pr >>"' driver-integration-memory-tests: environment: CIRCLE_ARTIFACTS: /tmp/artifacts @@ -3641,11 +3602,6 @@ jobs: working_directory: ~/cypress orbs: browser-tools: circleci/browser-tools@2.1.1 - continuation: circleci/continuation@1.1.0 -parameters: - is_contributor_pr: - default: false - type: boolean version: 2.1 workflows: darwin-arm64: @@ -4308,8 +4264,6 @@ workflows: value: << pipeline.git.branch >> pull-request: jobs: - - debug: - is_contributor_pr: << pipeline.parameters.is_contributor_pr >> - node_modules_install: build-better-sqlite3: true - build: @@ -4326,10 +4280,11 @@ workflows: - lint-types: requires: - build - - approve-contributor-pr - - approve-internal-pr: - requires: - - approve-contributor-pr + - approve-contributor-pr: + filters: + branches: + only: /^pull\/[0-9]+/ + type: approval - cli-visual-tests: context: test-runner:percy requires: From 56527e41095bdfea7b977785b1ad5ef9a89db71d Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Fri, 12 Sep 2025 15:58:50 -0400 Subject: [PATCH 23/26] fix --- .circleci/src/workflows/workflows/pull-request.yml | 2 +- .circleci/workflows.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/src/workflows/workflows/pull-request.yml b/.circleci/src/workflows/workflows/pull-request.yml index fecd3d56ca4..033cf0ae926 100644 --- a/.circleci/src/workflows/workflows/pull-request.yml +++ b/.circleci/src/workflows/workflows/pull-request.yml @@ -3,7 +3,7 @@ # Internal PR for any branch that does is not develop or release/ related when: not: - and: + or: - equal: [ "develop", << pipeline.git.branch >> ] - matches: pattern: /^release\/.*/ diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 9d2705c46be..d94d10f3e25 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -4605,7 +4605,7 @@ workflows: - driver-integration-memory-tests when: not: - and: + or: - equal: - develop - << pipeline.git.branch >> From 84d05293b033d1e1b96d28c5f93cc96d68f182a7 Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Fri, 12 Sep 2025 16:05:03 -0400 Subject: [PATCH 24/26] fix conditional on pr pipeline --- .../src/workflows/workflows/pull-request.yml | 20 ++++++++++++------- .circleci/workflows.yml | 20 ++++++++++++------- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/.circleci/src/workflows/workflows/pull-request.yml b/.circleci/src/workflows/workflows/pull-request.yml index 3568756319a..2d69cb42f10 100644 --- a/.circleci/src/workflows/workflows/pull-request.yml +++ b/.circleci/src/workflows/workflows/pull-request.yml @@ -1,12 +1,18 @@ when: - or: - - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> - - matches: - pattern: /^use-pack-for-circle/ - value: << pipeline.git.branch >> + and: + - not: + matches: + pattern: /^release\// + value: << pipeline.git.branch >> + - not: + matches: + pattern: /^develop/ + value: << pipeline.git.branch >> + - not: + matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> jobs: - node_modules_install: diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index c8aca4aba15..3c7dfcefa17 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -5000,13 +5000,19 @@ workflows: - get-published-artifacts - system-tests-node-modules-install when: - or: - - matches: - pattern: /^pull\/[0-9]+/ - value: << pipeline.git.branch >> - - matches: - pattern: /^use-pack-for-circle/ - value: << pipeline.git.branch >> + and: + - not: + matches: + pattern: /^release\// + value: << pipeline.git.branch >> + - not: + matches: + pattern: /^develop/ + value: << pipeline.git.branch >> + - not: + matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> windows: jobs: - node_modules_install: From 7f762e87bc14ef358a79af13643245c1cfdfea5a Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Tue, 23 Sep 2025 10:45:58 -0400 Subject: [PATCH 25/26] rm contributor pr flag on build job, use local env var instead --- .circleci/src/workflows/@workflows.yml | 8 +++----- .circleci/workflows.yml | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.circleci/src/workflows/@workflows.yml b/.circleci/src/workflows/@workflows.yml index 24873e62426..7424be33aa8 100644 --- a/.circleci/src/workflows/@workflows.yml +++ b/.circleci/src/workflows/@workflows.yml @@ -1494,9 +1494,6 @@ jobs: resource_class: type: string default: large - is_contributor_pr: - type: boolean - default: false resource_class: << parameters.resource_class >> steps: - restore_cached_workspace @@ -1515,8 +1512,9 @@ jobs: command: yarn list --depth=0 || true - run: name: Check env canaries - command: node ./scripts/circle-env.js --check-canaries --is-contributor-pr << - parameters.is_contributor_pr >> + command: | + IS_CONTRIBUTOR_PR=$([[ "<< pipeline.git.branch >>" =~ ^pull/[0-9]+$ ]] && echo "true" || echo "false") + node ./scripts/circle-env.js --check-canaries --is-contributor-pr $IS_CONTRIBUTOR_PR - build-and-persist lint: diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index b00ecdd18f9..161c3bb5386 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -1411,9 +1411,6 @@ jobs: executor: default: cy-doc type: executor - is_contributor_pr: - default: false - type: boolean only-cache-for-root-user: default: false type: boolean @@ -1441,8 +1438,9 @@ jobs: command: yarn list --depth=0 || true name: Top level packages - run: - command: node ./scripts/circle-env.js --check-canaries --is-contributor-pr << - parameters.is_contributor_pr >> + command: | + IS_CONTRIBUTOR_PR=$([[ "<< pipeline.git.branch >>" =~ ^pull/[0-9]+$ ]] && echo "true" || echo "false") + node ./scripts/circle-env.js --check-canaries --is-contributor-pr $IS_CONTRIBUTOR_PR name: Check env canaries - build-and-persist working_directory: ~/cypress From ea3703bd616e178670a7cf7b5fcc9ce64019b10d Mon Sep 17 00:00:00 2001 From: Cacie Prins Date: Fri, 3 Oct 2025 11:04:56 -0400 Subject: [PATCH 26/26] bump cache --- .circleci/cache-version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/cache-version.txt b/.circleci/cache-version.txt index 62db25bb179..715d8754f8f 100644 --- a/.circleci/cache-version.txt +++ b/.circleci/cache-version.txt @@ -1,2 +1,2 @@ # Bump this version to force CI to re-create the cache from scratch. -9-30-2026 +10-03-2026