Skip to content

Commit

Permalink
Merge branch 'develop' into issue-18644-flaky-system-tests-firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmunechika committed Nov 15, 2021
2 parents 5a95ea6 + 50d1070 commit 0b28562
Show file tree
Hide file tree
Showing 134 changed files with 6,077 additions and 1,688 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ system-tests/projects/e2e/cypress/integration/typescript_syntax_error_spec.ts

# cli/types is linted by tslint/dtslint
cli/types

# packages/example is not linted (think about changing this)
packages/example

Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ cypress.zip
Cached Theme.pak
Cached Theme Material Design.pak

# from config, compiled .js files
packages/config/lib/*.js

# from data-context, compiled .js files
packages/data-context/src/**/*.js

# from desktop-gui
packages/desktop-gui/cypress/videos
packages/desktop-gui/src/jsconfig.json


# from driver
packages/driver/cypress/videos
packages/driver/cypress/screenshots
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.17.0
16.5.0
4 changes: 3 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
// To see these extensions in VS Code:
// 1. Open the Command Palette (Ctrl+Shift+P)
// 1. Open the Command Palette:
// - Non-Mac Users: (Ctrl+Shift+P)
// - Mac Users: (Cmd+Shift+P)
// 2. Select "Extensions: Show Recommended Extensions"

// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
Expand Down
4 changes: 0 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,6 @@ The project utilizes [yarn workspaces](https://yarnpkg.com/lang/en/docs/workspac
> **⚠ Running on Windows?**
>
> Many of the NPM scripts used during development use commands designed for a Linux-like shell.If you are running a Windows operating system, you may encounter many commands that are not working. To fix this behavior, you have to set a Linux-like shell as the default `npm` script shell. If you have Git for Windows installed, you can set Git Bash as the default script shell by using the following command:
> ```bash
> yarn config set script-shell "C:\\Program Files (x86)\\git\\bin\\bash.exe"
> ```
> Git Bash may be installed in `Program Files`, if so, use the following command:
>```bash
> yarn config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"
>```
Expand Down
9 changes: 0 additions & 9 deletions __snapshots__/upload-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,12 @@ exports['test runner manifest'] = {
"mac": {
"url": "https://cdn.cypress.io/desktop/3.3.0/darwin-x64/cypress.zip"
},
"win": {
"url": "https://cdn.cypress.io/desktop/3.3.0/win32-ia32/cypress.zip"
},
"linux64": {
"url": "https://cdn.cypress.io/desktop/3.3.0/linux-x64/cypress.zip"
},
"darwin": {
"url": "https://cdn.cypress.io/desktop/3.3.0/darwin-x64/cypress.zip"
},
"win32": {
"url": "https://cdn.cypress.io/desktop/3.3.0/win32-ia32/cypress.zip"
},
"linux": {
"url": "https://cdn.cypress.io/desktop/3.3.0/linux-x64/cypress.zip"
},
Expand All @@ -26,9 +20,6 @@ exports['test runner manifest'] = {
"linux-x64": {
"url": "https://cdn.cypress.io/desktop/3.3.0/linux-x64/cypress.zip"
},
"win32-ia32": {
"url": "https://cdn.cypress.io/desktop/3.3.0/win32-ia32/cypress.zip"
},
"win32-x64": {
"url": "https://cdn.cypress.io/desktop/3.3.0/win32-x64/cypress.zip"
}
Expand Down
4 changes: 0 additions & 4 deletions __snapshots__/util-upload-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ exports['upload util isValidPlatformArch checks given strings second 1'] = {
"given": "linux-x64",
"expect": true
},
{
"given": "win32-ia32",
"expect": true
},
{
"given": "win32-x64",
"expect": true
Expand Down
5 changes: 2 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ branches:
only:
- master
- develop
- fix-test-other-projects
- 9.0-release
- /win*/

# https://www.appveyor.com/docs/lang/nodejs-iojs/
environment:
# use matching version of Node.js
nodejs_version: "14.17.0"
nodejs_version: "16.5.0"
# encode secure variables which will NOT be used
# in pull requests
# https://www.appveyor.com/docs/build-configuration/#secure-variables
Expand Down Expand Up @@ -38,7 +38,6 @@ environment:

platform:
- x64
- x86

# https://www.appveyor.com/docs/build-cache/
# hmm, seems there is NPM on windows problem
Expand Down
89 changes: 49 additions & 40 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ macBuildFilters: &macBuildFilters
branches:
only:
- develop
- tgriesser/chore/fix-release
- 9.0-release

defaults: &defaults
parallelism: 1
Expand Down Expand Up @@ -42,15 +42,15 @@ onlyMainBranches: &onlyMainBranches
branches:
only:
- develop
- tgriesser/chore/fix-release
- 9.0-release
requires:
- create-build-artifacts

executors:
# the Docker image with Cypress dependencies and Chrome browser
cy-doc:
docker:
- image: cypress/browsers:node14.17.0-chrome91-ff89
- image: cypress/browsers:node16.5.0-chrome94-ff93
# by default, we use "small" to save on CI costs. bump on a per-job basis if needed.
resource_class: small
environment:
Expand All @@ -59,7 +59,7 @@ executors:
# Docker image with non-root "node" user
non-root-docker-user:
docker:
- image: cypress/browsers:node14.17.0-chrome91-ff89
- image: cypress/browsers:node16.5.0-chrome94-ff93
user: node
environment:
PLATFORM: linux
Expand All @@ -70,7 +70,7 @@ executors:
mac:
macos:
# Executor should have Node >= required version
xcode: "12.2.0"
xcode: "13.0.0"
environment:
PLATFORM: mac

Expand Down Expand Up @@ -266,27 +266,29 @@ commands:

install-required-node:
# https://discuss.circleci.com/t/switch-nodejs-version-on-machine-executor-solved/26675/2
description: Install Node version matching .node-version
description: Install Node version
parameters:
version:
type: string
default: ""
steps:
- run:
name: Install NVM
name: Install NVM + Node
# TODO: determine why we get the missing .nvmrc file error
command: |
export NODE_VERSION=$(cat .node-version)
export NODE_VERSION=<<parameters.version>>
export NODE_VERSION=${NODE_VERSION:-$(cat .node-version)}
echo "Installing Node $NODE_VERSION"
echo $NODE_VERSION > .node-version
cp .node-version .nvmrc
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.3/install.sh | bash
- run:
# https://github.com/nvm-sh/nvm#nvmrc
name: Install Node
command: |
. ./scripts/load-nvm.sh
echo "before nvm install"
nvm install
nvm install $NODE_VERSION
echo "before nvm use"
nvm use
nvm use $NODE_VERSION
echo "before nvm alias default"
nvm alias default
nvm alias default $NODE_VERSION
node --version
install-chrome:
Expand Down Expand Up @@ -556,7 +558,7 @@ commands:
working_directory: /tmp/<<parameters.repo>>
# force installing the freshly built binary
command: |
CYPRESS_INSTALL_BINARY=~/cypress/cypress.zip npm i ~/cypress/cypress.tgz && [[ -f yarn.lock ]] && yarn
CYPRESS_INSTALL_BINARY=~/cypress/cypress.zip npm i --legacy-peer-deps ~/cypress/cypress.tgz && [[ -f yarn.lock ]] && yarn
- run:
name: Print Cypress version
working_directory: /tmp/<<parameters.repo>>
Expand Down Expand Up @@ -686,7 +688,7 @@ commands:
CYPRESS_INSTALL_BINARY=~/cypress/cypress.zip yarn add -D ~/cypress/cypress.tgz
else
npm install
CYPRESS_INSTALL_BINARY=~/cypress/cypress.zip npm install ~/cypress/cypress.tgz
CYPRESS_INSTALL_BINARY=~/cypress/cypress.zip npm install --legacy-peer-deps ~/cypress/cypress.tgz
fi
working_directory: /tmp/<<parameters.repo>>
- run:
Expand Down Expand Up @@ -838,7 +840,7 @@ commands:
paths:
- cypress/binary-url.json

build-npm-package:
build-cypress-npm-package:
steps:
- run:
name: bump NPM version
Expand All @@ -857,13 +859,12 @@ commands:
- run:
name: pack NPM package
working_directory: cli/build
command: yarn pack
command: yarn pack --filename cypress.tgz
- run:
name: list created NPM package
working_directory: cli/build
command: ls -l
# created file should have filename cypress-<version>.tgz
- run: cp cli/build/cypress-v*.tgz cypress.tgz
- run: cp cli/build/cypress.tgz cypress.tgz
- store-npm-logs
- run: pwd
- run: ls -l
Expand Down Expand Up @@ -964,7 +965,7 @@ jobs:
desktop-gui-component-tests,
cli-visual-tests,
runner-integration-tests-chrome,
runner-ct-integration-tests-chrome
runner-ct-integration-tests-chrome,
reporter-integration-tests,
- run: yarn percy build:finalize

Expand Down Expand Up @@ -1468,20 +1469,27 @@ jobs:
<<: *defaults
steps:
- restore_cached_workspace
- install-required-node:
version: "16.10"
- run:
name: Build
command: yarn workspace @cypress/schematic build:all
- run:
name: Install @angular/cli
command: yarn policies set-version 1.19.0 && yarn add --dev @angular/cli
name: Build + Install
command: |
. ../../scripts/load-nvm.sh
yarn workspace @cypress/schematic build:all
yarn policies set-version 1.19.0
yarn add --dev @angular/cli
working_directory: npm/cypress-schematic
- run:
name: Launch
command: yarn launch:test
command: |
. ../../scripts/load-nvm.sh
yarn launch:test
working_directory: npm/cypress-schematic
- run:
name: Run unit tests
command: yarn test
command: |
. ../../scripts/load-nvm.sh
yarn test
working_directory: npm/cypress-schematic
- store-npm-logs

Expand All @@ -1501,11 +1509,11 @@ jobs:
steps:
- restore_cached_workspace
- build-binary
- build-npm-package
- build-cypress-npm-package
- run:
name: Check current branch to persist artifacts
command: |
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "tgriesser/chore/fix-release" ]]; then
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "9.0-release" ]]; then
echo "Not uploading artifacts or posting install comment for this branch."
circleci-agent step halt
fi
Expand Down Expand Up @@ -1800,7 +1808,7 @@ jobs:
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
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
Expand Down Expand Up @@ -1897,6 +1905,7 @@ jobs:
repo: cypress-example-conduit-app
browser: chrome
command: "npm run cypress:run"
wait-on: http://localhost:3000

"test-binary-against-api-testing-firefox":
<<: *defaults
Expand Down Expand Up @@ -2146,7 +2155,7 @@ linux-workflow: &linux-workflow
branches:
only:
- develop
- tgriesser/chore/fix-release
- 9.0-release
requires:
- build
- test-kitchensink:
Expand All @@ -2158,7 +2167,7 @@ linux-workflow: &linux-workflow
branches:
only:
- develop
- tgriesser/chore/fix-release
- 9.0-release
requires:
- build
- create-build-artifacts:
Expand Down Expand Up @@ -2208,15 +2217,15 @@ linux-workflow: &linux-workflow
branches:
only:
- develop
- tgriesser/chore/fix-release
- 9.0-release
requires:
- create-build-artifacts
- test-npm-module-and-verify-binary:
filters:
branches:
only:
- develop
- tgriesser/chore/fix-release
- 9.0-release
requires:
- create-build-artifacts
- test-binary-against-staging:
Expand All @@ -2225,7 +2234,7 @@ linux-workflow: &linux-workflow
branches:
only:
- develop
- tgriesser/chore/fix-release
- 9.0-release
requires:
- create-build-artifacts

Expand All @@ -2250,7 +2259,7 @@ linux-workflow: &linux-workflow
branches:
only:
- develop
- tgriesser/chore/fix-release
- 9.0-release
requires:
- create-build-artifacts

Expand Down Expand Up @@ -2322,7 +2331,7 @@ mac-workflow: &mac-workflow
branches:
only:
- develop
- tgriesser/chore/fix-release
- 9.0-release
requires:
- darwin-create-build-artifacts

Expand All @@ -2334,7 +2343,7 @@ mac-workflow: &mac-workflow
branches:
only:
- develop
- tgriesser/chore/fix-release
- 9.0-release
requires:
- darwin-create-build-artifacts

Expand Down
2 changes: 1 addition & 1 deletion cli/__snapshots__/download_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ URL: https://download.cypress.io/desktop?platform=OS&arch=ARCH
----------
Platform: darwin (Foo-OsVersion)
Platform: darwin-x64 (Foo-OsVersion)
Cypress Version: 1.2.3
`
Expand Down

0 comments on commit 0b28562

Please sign in to comment.