Skip to content

Commit

Permalink
Merge branch 'develop' into lerna-optimize-tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
astone123 committed Sep 12, 2023
2 parents c6aefd6 + 8638abb commit 54046a9
Show file tree
Hide file tree
Showing 671 changed files with 30,358 additions and 11,264 deletions.
2 changes: 1 addition & 1 deletion .circleci/cache-version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Bump this version to force CI to re-create the cache from scratch.

08-26-23
09-3-23
45 changes: 24 additions & 21 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ mainBuildFilters: &mainBuildFilters
- 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/update_webpack_deps_to_latest_webpack4_compat'
- 'chore/bump_loaders_and_optimize_webpack'
- 'publish-binary'
- 'chore/update_electron25_and_node18'
- 'lerna-optimize-tasks'

# usually we don't build Mac app - it takes a long time
Expand Down Expand Up @@ -87,7 +86,7 @@ executors:
# the Docker image with Cypress dependencies and Chrome browser
cy-doc:
docker:
- image: cypress/browsers:node16.16.0-chrome106-ff99-edge
- image: cypress/browsers-internal:node18.15.0-chrome114-ff115
# by default, we use "medium" to balance performance + CI costs. bump or reduce on a per-job basis if needed.
resource_class: medium
environment:
Expand All @@ -97,7 +96,7 @@ executors:
# Docker image with non-root "node" user
non-root-docker-user:
docker:
- image: cypress/browsers:node16.16.0-chrome106-ff99-edge
- image: cypress/browsers-internal:node18.15.0-chrome114-ff115
user: node
environment:
PLATFORM: linux
Expand Down Expand Up @@ -214,6 +213,11 @@ commands:
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: |
Expand Down Expand Up @@ -506,7 +510,7 @@ commands:
# internal PR
CYPRESS_RECORD_KEY=$MAIN_RECORD_KEY \
CYPRESS_INTERNAL_ENABLE_TELEMETRY="true" \
yarn cypress:run --record --parallel --group 5x-driver-<<parameters.browser>> --browser <<parameters.browser>>
yarn cypress:run --record --parallel --group 5x-driver-<<parameters.browser>> --browser <<parameters.browser>> --runner-ui
else
# external PR
TESTFILES=$(circleci tests glob "cypress/e2e/**/*.cy.*" | circleci tests split --total=$CIRCLE_NODE_TOTAL)
Expand All @@ -515,7 +519,7 @@ commands:
if [[ -z "$TESTFILES" ]]; then
echo "Empty list of test files"
fi
yarn cypress:run --browser <<parameters.browser>> --spec $TESTFILES
yarn cypress:run --browser <<parameters.browser>> --spec $TESTFILES --runner-ui
fi
working_directory: packages/driver
- verify-mocha-results
Expand Down Expand Up @@ -589,7 +593,7 @@ commands:
if [[ <<parameters.type>> == '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.*' -not -regex '.*(FileMatch|PromoAction|SelectorPlayground).cy.*' | circleci tests split --total=$CIRCLE_NODE_TOTAL)
TESTFILES=$(find src -regextype posix-extended -name '*.cy.*' -not -regex '.*(FileMatch|PromoAction|SelectorPlayground|useDurationFormat|useTestingType|SpecPatterns).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)
Expand Down Expand Up @@ -823,13 +827,10 @@ commands:
working_directory: /tmp/<<parameters.repo>>
command: yarn types
- run:
# NOTE: we do not need to wait for the vite dev server to start
working_directory: /tmp/<<parameters.repo>>
command: <<parameters.server-start-command>>
background: true
- run:
condition: <<parameters.wait-on>>
name: "Waiting on server to boot: <<parameters.wait-on>>"
command: "npx wait-on <<parameters.wait-on>>"
- when:
condition: <<parameters.folder>>
steps:
Expand Down Expand Up @@ -1842,7 +1843,7 @@ jobs:
PERCY_ENABLE=${PERCY_TOKEN:-0} \
PERCY_PARALLEL_TOTAL=-1 \
yarn percy exec --parallel -- -- \
yarn cypress:run --record --parallel --group reporter
yarn cypress:run --record --parallel --group reporter --runner-ui
working_directory: packages/reporter
- verify-mocha-results
- store_test_results:
Expand Down Expand Up @@ -2182,7 +2183,6 @@ jobs:
CYPRESS_PROJECT_ID=$TEST_KITCHENSINK_PROJECT_ID \
CYPRESS_RECORD_KEY=$TEST_KITCHENSINK_RECORD_KEY \
CYPRESS_INTERNAL_ENV=staging \
CYPRESS_video=false \
yarn cypress:run --project /tmp/cypress-example-kitchensink --record
- store-npm-logs

Expand Down Expand Up @@ -2241,7 +2241,7 @@ jobs:
<<: *defaults
resource_class: small
docker:
- image: cypress/base:16.16.0
- image: cypress/base-internal:18.15.0
steps:
- restore_workspace_binaries
- run: mkdir test-binary
Expand All @@ -2256,15 +2256,15 @@ jobs:
- run:
name: Verify Cypress binary
working_directory: test-binary
command: $(npm bin)/cypress verify
command: npx cypress verify
- run:
name: Print Cypress version
working_directory: test-binary
command: $(npm bin)/cypress version
command: npx cypress version
- run:
name: Cypress info
working_directory: test-binary
command: $(npm bin)/cypress info
command: npx cypress info

test-types-cypress-and-jest:
parameters:
Expand Down Expand Up @@ -2368,13 +2368,15 @@ jobs:
- 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
Expand All @@ -2384,6 +2386,7 @@ jobs:
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
Expand Down Expand Up @@ -2411,7 +2414,7 @@ jobs:
steps:
- test-binary-against-repo:
repo: cypress-example-kitchensink
browser: "electron"
browser: electron

test-binary-against-kitchensink-firefox:
<<: *defaults
Expand Down Expand Up @@ -2800,7 +2803,7 @@ linux-x64-workflow: &linux-x64-workflow
- build
- wait-for-binary-publish:
type: approval
requires:
requires:
- create-and-trigger-packaging-artifacts
- get-published-artifacts:
context:
Expand Down Expand Up @@ -2917,7 +2920,7 @@ linux-arm64-workflow: &linux-arm64-workflow
- wait-for-binary-publish:
name: linux-arm64-wait-for-binary-publish
type: approval
requires:
requires:
- linux-arm64-create-and-trigger-packaging-artifacts

- get-published-artifacts:
Expand Down
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ module.exports = {
'cli/types/**',
// these fixtures are supposed to fail linting
'npm/eslint-plugin-dev/test/fixtures/**',
// Cloud generated
'system-tests/lib/validations/**',
],
overrides: [
{
Expand Down
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@

**/.eslintrc text eol=lf

packages/errors/__snapshot-html__/** linguist-generated=true
packages/errors/__snapshot-html__/** linguist-generated=true
system-tests/lib/validations/** linguist-generated=true
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
#
# Changes to the Module API, after:run, or after:spec results should be
# reviewed by Brian and/or Jennifer
/system-tests/__snapshots__/results_spec.ts.js @brian-mann @jennifer-shehane
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/1-bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ body:
attributes:
label: Node version
description: What version of node.js are you using to run Cypress?
placeholder: ex. v16.16.0
placeholder: ex. v18.15.0
validations:
required: true
- type: input
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/2-memory-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ body:
attributes:
label: Node version
description: What version of node.js are you using to run Cypress?
placeholder: ex. v16.16.0
placeholder: ex. v18.15.0
validations:
required: true
- type: input
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/3-install-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ body:
attributes:
label: Node version
description: What version of node.js are you using to run Cypress?
placeholder: ex. v16.16.0
placeholder: ex. v18.15.0
validations:
required: true
- type: dropdown
Expand Down
35 changes: 23 additions & 12 deletions .github/workflows/snyk_sca_scan.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,43 @@
name: Snyk Software Composition Analysis Scan
# This git workflow leverages Snyk actions to perform a Software Composition
# This git workflow leverages Snyk actions to perform a Software Composition
# Analysis scan on our Opensource libraries upon Pull Requests to the
# "develop" branch. We use this as a control to prevent vulnerable packages
# from being introduced into the codebase.
# "develop" branch. We use this as a control to prevent vulnerable packages
# from being introduced into the codebase.
# Enhancements were made to this action to build the yarn packages to reduce
# Snyk scan errors that were complaining about the yarn.locks etc. Also
# implemented PAT token for actions to resolve an issue with the action not
# running and reporting back to the PR status checks
on:
pull_request_target:
types:
- opened
branches:
pull_request:
branches:
- develop
jobs:
Snyk_SCA_Scan:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Setting up Node
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.BOT_GITHUB_ACTION_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
node-version: 18
cache: 'yarn'
- name: Run yarn
run: yarn
- name: Run build
run: yarn build
- name: Installing snyk-delta and dependencies
run: npm i -g snyk-delta
- uses: snyk/actions/setup@master
- name: Perform SCA Scan
continue-on-error: false
run: |
snyk test --all-projects --strict-out-of-sync=false --detection-depth=6 --exclude=system-tests,docker,Dockerfile --severity-threshold=critical
snyk test --all-projects --strict-out-of-sync=false --detection-depth=6 --exclude=system-tests,tooling,docker,Dockerfile --severity-threshold=critical
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
27 changes: 19 additions & 8 deletions .github/workflows/snyk_static_analysis_scan.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
name: Snyk Static Analysis Scan
# This git workflow leverages Snyk actions to perform a Static Application
# This git workflow leverages Snyk actions to perform a Static Application
# Testing scan (SAST) on our first-party code upon Pull Requests to the
# "develop" branch. We use this as a control to prevent vulnerabilities
# from being introduced into the codebase.
# "develop" branch. We use this as a control to prevent vulnerabilities
# from being introduced into the codebase.
on:
pull_request_target:
types:
- opened
branches:
pull_request:
branches:
- develop
jobs:
Snyk_SAST_Scan :
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.BOT_GITHUB_ACTION_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
- name: Run yarn
run: yarn
- name: Run build
run: yarn build
- uses: snyk/actions/setup@master
- name: Perform Static Analysis Test
continue-on-error: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-browser-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18
- name: Check for new Chrome versions
id: get-versions
uses: actions/github-script@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_v8_snapshot_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'yarn'
- name: Run yarn
run: yarn
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -395,3 +395,6 @@ tooling/v8-snapshot/cache/dev-win32
tooling/v8-snapshot/cache/prod-darwin
tooling/v8-snapshot/cache/prod-linux
tooling/v8-snapshot/cache/prod-win32

# Cloud API validations
system-tests/lib/validations
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.16.0
18.15.0
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Here is a list of the core packages in this repository with a short description,
| [socket](./packages/socket) | `@packages/socket` | A wrapper around socket.io to provide common libraries. |
| [ts](./packages/ts) | `@packages/ts` | A centralized version of typescript. |
| [types](./packages/types) | `@packages/types` | The shared internal Cypress types. |
| [v8-snapshot-require](./packages/v8-snapshot-require) | `@packages/v8-snapshot-requie` | Tool to load a snapshot for Electron applications that was created by `@tooling/v8-snapshot`. |
| [v8-snapshot-require](./packages/v8-snapshot-require) | `@packages/v8-snapshot-require` | Tool to load a snapshot for Electron applications that was created by `@tooling/v8-snapshot`. |
| [web-config](./packages/web-config) | `@packages/web-config` | The web-related configuration. |

Private packages involved in development of the app live within the [`tooling`](./tooling) directory and are in the `@tooling/` namespace. They are discrete modules with different responsibilities, but each is necessary for development of the Cypress app and is not necessarily useful outside of the Cypress app.
Expand Down Expand Up @@ -414,7 +414,7 @@ The repository has one protected branch:

We want to publish our [standalone npm packages](./npm) continuously as new features are added. Therefore, after any pull request that changes independent `@cypress/` packages in the [`npm`](./npm) directory will automatically publish when a PR is merged directly into `develop` and the entire build passes. We used [`semantic-release`](https://semantic-release.gitbook.io/semantic-release/) to automate the release of these packages to npm.

We do not continuously deploy the Cypress binary, so `develop` contains all of the new features and fixes that are staged to go out in the next update of the main Cypress app. If you make changes to an npm package that can't be published until the binary is also updated, you should make a pull request against specifying this is not be merged until the scheduled Cypress app release date.
We do not continuously deploy the Cypress binary, so `develop` contains all of the new features and fixes that are staged to go out in the next update of the main Cypress app. If you make changes to an npm package that can't be published until the binary is also updated, the pull request should clearly state that it should not be merged until the next scheduled Cypress app release date.

### Pull Requests

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Cypress.io
Copyright (c) 2023 Cypress.io

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

5 comments on commit 54046a9

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 54046a9 Sep 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.2.1/linux-x64/lerna-optimize-tasks-54046a94ad9230ed3734faeaa376244fc54730f2/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 54046a9 Sep 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.2.1/linux-arm64/lerna-optimize-tasks-54046a94ad9230ed3734faeaa376244fc54730f2/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 54046a9 Sep 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.2.1/darwin-arm64/lerna-optimize-tasks-54046a94ad9230ed3734faeaa376244fc54730f2/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 54046a9 Sep 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.2.1/darwin-x64/lerna-optimize-tasks-54046a94ad9230ed3734faeaa376244fc54730f2/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 54046a9 Sep 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.2.1/win32-x64/lerna-optimize-tasks-54046a94ad9230ed3734faeaa376244fc54730f2/cypress.tgz

Please sign in to comment.