Files
cypress/circle.yml
Ben Kucera 7857dac907 [internal] use webpack for builds (#4103)
* add webpack

* fix build proccess

* fix reporter build and test

* fix reporter test .css

* use apply(window, ...) since strict mode in webpack

* temp 05/13/19 [skip ci] resolver

* temp 05/14/19 [skip ci] webpack w/ root level symlinks

* run ci

* minor fixes

* fix link-packages script

* hopefully fix mac build

* re-add build-prod script in reporter

* fix typo in link-packages script

* fix lint errors

* fix node-version

* namespace files in webpack

* bust circle ci cache

* bust circle ci cache 2

* remove deps

* bust circle ci cache 3

* bust circle ci cache (launcher)

* ok circleci, you win. I will change all the cache keys

* update snapshot: not sure why added stack lines

* add mocha to reporter devDeps

* separate build file for reporter

* remove unneeded code

* node-sass-globbing use relative imports for appveyor

* add debugging for appveyor failure

* node-sass-globbing force unix paths for windows

* node-sass-globbing force unix paths for windows 2

* node-sass-globbing force unix paths for windows in runner

* run ci

* add checksum to packages caches

* bust circle ci cache (sub packages)

* testing code for appveyor env vars

* fix appveyor env vars for branchname
06-00000026

* fix binary build script, smoke test catch errors, include pkg mains
03-0000000a

* build binary in appveyor for this branch
07-00000047

* fix binary unit test, revert mocha upgrade in root, fix e2e specs
02-00000004

* statically replace symlinks at build time, add test, remove proxy packages code
03-00000002

* oops, update snapshot
04-00000049

* bump circle packages cache
02-00000005

* fix path.win32 on windows, add test for it
00-00000058

* for some reason packages ci cache is not including `rebuild-node-sass` in node_modules/.bin, and npm does not recreate .bin links if a node_modules folder already exists. so Im bumping all the npm caches, again
00-00000003

* emit during webpack-dev-server watch mode
02-00000020

* try revert circle.yml
02-0000002f

* try revert everything
03-0000003b

* Revert "try revert everything"

This reverts commit be125b88ff.

* no circle cache now
02-00000013

* remove logging in reporter build
06-00002a41

* Merge branch develop of github.com:cypress-io/cypress into webpack-runner
02-0000089b

* make build scripts DRY
04-00000a7f

* fix missing fonts, better watch mode
06-00003053

* use webpack --progress in watch mode
00-00000582

* move webpack config files into dedicated package
05-000023bf

* build desktop-gui with webpack, use relative scss url()s
03-00001801

* add timings info, fix configs
07-00005582

* enable sourcemaps "eval", fix desktopgui test
04-00005a08

* try 2: fix desktopgui test
01-0000058e

* fix lint
03-00000b10

* fix snapshot (very minor do not worry)
04-000014a4

* code cleanup
00-00007a4f

* try disable devtool
07-0000a97a

* remove cypress:// devtool sourceURL mapping to prevent cross-domain on electron
00-000056e4

* re-enable eval sourcemap in dev and prod
06-000051e6

* code cleanup
02-000056ae

* refactor node-jsdom setup for tests
00-000041a2

* re-enable sourceURL protocol, enable crossorigin script on runner to appease electron

* smoke tests for static assets in binary build script, disable sourceURL protocol mapping, more consistent dev/prod webpack builds

* use cross-env for desktop-gui

* desktop-dui: expect development NODE_ENV during build script (as has been in past)

* fix build script unit test

* fix build script unit test for real

* fix sourcemaps for dev/prod, add comments, add build static asset tests

* add cross-env to runner devDeps

* fix unit tests for build binary script

* fix whitespace

* add postcss autoprefixer + staticAsset tets

* add eslintrc to scripts/unit

* tabs -> spaces

* tabs -> spaces

* fix binary/util scripts

* fix testStaticAssets in build script

* fix extension requiring node socket

* fix unit-test for binary build script

* fix unit test for runner/reporter

* disable sourcemaps/eval in production

* fix disable sourcemaps in prod code

* resort jsons w/ new lint

* linting fixes

* runner/package.json add back rebuild-node-sass

* no circle cache again

* fix circle.yml

* try appveyor again

* fix binary build: remove "timers" from server/package.json.files

* fix testStaticAssets false-positive sourcemap detection (due to diff package)

* fix 2 failing e2e tests (run in chrome for now)
use build-prod scripts in binary-build script
add build-prod scripts to all packages

* a string is no regex

* correct merge: global_mode_spec

* fix all snapshot screenshot dimensions

* fix all snapshot screenshot dimensions (again)

* fix testStaticAssets development -> production

* Revert "fix all snapshot screenshot dimensions (again)"

This reverts commit d9022ef950.

* Revert "fix all snapshot screenshot dimensions"

This reverts commit 4f7628a051.

* helpers/e2e: only normalize screenshot dimensions NOT on electron

* post-task: windows build don't build on this branch

* post-task: un-bump circleci cache

* post-task: bump circleci cache packages/node_modules to v9

* cleanup: fix eol-newline, remove unneeded eslintrc

* bump circleci cache

* run rebuild-node-sass inside webpack build config

* bump circleci cache

* use cache version from env variable on circle

* use custom command to save cache for most packages

* add custom restore cache command

* restore 2 packages separately

* allow passing package path to restore

* pass explicit path to package to restore

* add restore-caches and save-caches

* print name for restoring cache commands

* print name when storing cache

* print .bin when saving cache

* fix path to .bin

* print launcher .bin

* show .bin for desktop-gui

* print bins

* update npm version

* update npm version - try 2

* update npm version - try 3

* remove circleci debugging print commands

* Revert "remove circleci debugging print commands"

This reverts commit 248966efcd.

* add TERM=xterm to Circle

* Revert "Revert "remove circleci debugging print commands""

This reverts commit cf77273b10.

* Revert "add TERM=xterm to Circle"

This reverts commit dc77c94c57.

* remove --serial arg from run all scripts

* add web-config package to cache

* simplify circleci build job

* circleci: try rmrf node_modules/@packages before install

* appveyor: try removing --serial from install script

* Revert "appveyor: try removing --serial from install script"

This reverts commit 7ef619ff30.

* use appveyor from develop

* use preinstall removing subpackage symlinks
fix webpack config typescript errors
fix path to rebuild-node-sass in packages/web-config
assert replace minimum number of symlink requires

* test binary build [build binary]

* fix transformRequires code [build binary]
2019-07-18 12:11:27 -04:00

950 lines
27 KiB
YAML

version: 2.1
defaults: &defaults
parallelism: 1
working_directory: ~/cypress
parameters:
executor:
type: executor
default: cy-doc
executor: <<parameters.executor>>
environment:
## set specific timezone
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/browsers:node8.9.3-npm6.10.1-chrome75
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
mac:
macos:
xcode: "10.1.0"
environment:
PLATFORM: mac
commands:
# for caching node modules use project environment variable
# like CACHE_VERSION=15
save-cache:
description: |
Shorter command to save node_modules for a package
Warning! Only works with "packages/<name>/node_modules"
parameters:
packageName:
description: Name of the package to save, for example "server" or "desktop-gui"
type: string
steps:
- save_cache:
name: Saving cache for << parameters.packageName >>
key: v{{ .Environment.CACHE_VERSION }}-{{ arch }}-{{ .Branch }}-deps-<< parameters.packageName >>-{{ checksum "packages/<< parameters.packageName >>/package.json" }}
paths:
- packages/<< parameters.packageName >>/node_modules
save-caches:
description: save each node_modules folder per package
steps:
# TODO switch to "save-cache" when it allows custom paths
- save_cache:
key: v{{ .Environment.CACHE_VERSION }}-{{ arch }}-{{ .Branch }}-deps-cli-{{ checksum "cli/package.json" }}
paths:
- cli/node_modules
- save_cache:
key: v{{ .Environment.CACHE_VERSION }}-{{ arch }}-{{ .Branch }}-deps-root-{{ checksum "package.json" }}
paths:
- node_modules
- save-cache:
packageName: coffee
- save-cache:
packageName: desktop-gui
- save-cache:
packageName: driver
- save-cache:
packageName: example
# TODO switch to "save-cache" custom command when it allows passing list of paths
- save_cache:
key: v{{ .Environment.CACHE_VERSION }}-{{ arch }}-{{ .Branch }}-deps-electron-{{ checksum "packages/electron/package.json" }}
paths:
- packages/electron/node_modules
- ~/.cache/electron
- ~/.electron
- save-cache:
packageName: extension
- save-cache:
packageName: https-proxy
- save-cache:
packageName: launcher
- save-cache:
packageName: network
- save-cache:
packageName: reporter
- save-cache:
packageName: runner
- save-cache:
packageName: server
- save-cache:
packageName: socket
- save-cache:
packageName: static
- save-cache:
packageName: ts
- save-cache:
packageName: web-config
restore-cache:
description: |
Shorter command to restore node_modules for a package.
Since it does not list paths to restore, can restore any cache,
as long the key is the same as the saved one.
parameters:
packageName:
description: Name of the package to restore, for example "server" or "desktop-gui"
type: string
packagePath:
description: Path to package.json file
type: string
steps:
- restore_cache:
name: Restoring cache for << parameters.packageName >>
key: v{{ .Environment.CACHE_VERSION }}-{{ arch }}-{{ .Branch }}-deps-<< parameters.packageName >>-{{ checksum "<< parameters.packagePath >>" }}
restore-caches:
description: need to restore a separate cache for each package.json
steps:
- restore-cache:
packageName: cli
packagePath: cli/package.json
- restore-cache:
packageName: root
packagePath: package.json
- restore-cache:
packageName: coffee
packagePath: packages/coffee/package.json
- restore-cache:
packageName: desktop-gui
packagePath: packages/desktop-gui/package.json
- restore-cache:
packageName: driver
packagePath: packages/driver/package.json
- restore-cache:
packageName: example
packagePath: packages/example/package.json
- restore-cache:
packageName: electron
packagePath: packages/electron/package.json
- restore-cache:
packageName: extension
packagePath: packages/extension/package.json
- restore-cache:
packageName: https-proxy
packagePath: packages/https-proxy/package.json
- restore-cache:
packageName: launcher
packagePath: packages/launcher/package.json
- restore-cache:
packageName: network
packagePath: packages/network/package.json
- restore-cache:
packageName: reporter
packagePath: packages/reporter/package.json
- restore-cache:
packageName: runner
packagePath: packages/runner/package.json
- restore-cache:
packageName: server
packagePath: packages/server/package.json
- restore-cache:
packageName: socket
packagePath: packages/socket/package.json
- restore-cache:
packageName: static
packagePath: packages/static/package.json
- restore-cache:
packageName: ts
packagePath: packages/ts/package.json
- restore-cache:
packageName: web-config
packagePath: packages/web-config/package.json
jobs:
## code checkout and NPM installs
build:
<<: *defaults
steps:
- checkout
- run:
name: Print working folder
command: echo $PWD
- run:
name: print global NPM cache path
command: echo $(npm -g bin)
- run:
name: print Node version
command: node -v
- run:
name: print NPM version
command: npm -v
- run: npm run check-node-version
## 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
- run: npm run check-terminal
- run: npm run stop-only-all
- restore-caches
# show what is already cached globally
- run: ls $(npm -g bin)
- run: ls $(npm -g bin)/../lib/node_modules
# Install the root packages
# Link sup packages in ./node_modules/@packages/*
# Install sub packages dependencies and build all sub packages via postinstall script
- run: npm install
- run:
name: Top level packages
command: npm ls --depth=0 || true
# Prune so we do not save removed dependencies to cache
- run: npm run all prune
- save-caches
## save entire folder as artifact for other jobs to run without reinstalling
- persist_to_workspace:
root: ~/
paths:
- cypress
lint:
<<: *defaults
steps:
- attach_workspace:
at: ~/
## this will catch .only's in js/coffee as well
- run: npm run lint-all
unit-tests:
<<: *defaults
parallelism: 1
steps:
- attach_workspace:
at: ~/
# make sure mocha runs
- run: npm run test-mocha
# test binary build code
- run: npm run test-scripts
# make sure our snapshots are compared correctly
- run: npm run test-mocha-snapshot
# make sure packages with TypeScript can be transpiled to JS
- run: npm run all build-js
# run unit tests from individual packages
- run: npm run all test -- --package cli
- run: npm run all test -- --package electron
- run: npm run all test -- --package extension
- run: npm run all test -- --package https-proxy
- run: npm run all test -- --package launcher
- run: npm run all test -- --package network
# how to pass Mocha reporter through zunder?
- run: npm run all test -- --package reporter
- run: npm run all test -- --package runner
- run: npm run all test -- --package socket
- run: npm run all test -- --package static
- store_test_results:
path: /tmp/cypress
lint-types:
<<: *defaults
parallelism: 1
steps:
- attach_workspace:
at: ~/
- run:
command: ls -la types
working_directory: cli
- run:
command: ls -la chai
working_directory: cli/types
- run:
command: npm run dtslint
working_directory: cli
"server-unit-tests":
<<: *defaults
parallelism: 2
steps:
- attach_workspace:
at: ~/
- run: npm run all test-unit -- --package server
- store_test_results:
path: /tmp/cypress
"server-integration-tests":
<<: *defaults
parallelism: 2
steps:
- attach_workspace:
at: ~/
- run: npm run all test-integration -- --package server
- store_test_results:
path: /tmp/cypress
"server-performance-tests":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
command: npm run all test-performance -- --package server
- store_test_results:
path: /tmp/cypress
- store_artifacts:
path: /tmp/artifacts
"server-e2e-tests-1":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
command: npm run test-e2e -- --chunk 1
working_directory: packages/server
- store_test_results:
path: /tmp/cypress
"server-e2e-tests-2":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
command: npm run test-e2e -- --chunk 2
working_directory: packages/server
- store_test_results:
path: /tmp/cypress
"server-e2e-tests-3":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
command: npm run test-e2e -- --chunk 3
working_directory: packages/server
- store_test_results:
path: /tmp/cypress
"server-e2e-tests-4":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
command: npm run test-e2e -- --chunk 4
working_directory: packages/server
- store_test_results:
path: /tmp/cypress
"server-e2e-tests-5":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
command: npm run test-e2e -- --chunk 5
working_directory: packages/server
- store_test_results:
path: /tmp/cypress
"server-e2e-tests-6":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
command: npm run test-e2e -- --chunk 6
working_directory: packages/server
- store_test_results:
path: /tmp/cypress
"server-e2e-tests-7":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
command: npm run test-e2e -- --chunk 7
working_directory: packages/server
- store_test_results:
path: /tmp/cypress
"server-e2e-tests-8":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
command: npm run test-e2e -- --chunk 8
working_directory: packages/server
- store_test_results:
path: /tmp/cypress
"driver-integration-tests-3x":
<<: *defaults
parallelism: 3
steps:
- attach_workspace:
at: ~/
- run:
command: npm start
background: true
working_directory: packages/driver
- run:
command: $(npm bin)/wait-on http://localhost:3500
working_directory: packages/driver
- run:
command: |
CYPRESS_KONFIG_ENV=production \
CYPRESS_RECORD_KEY=$PACKAGES_RECORD_KEY \
npm run cypress:run -- --record --parallel --group 3x-driver-chrome --browser chrome
working_directory: packages/driver
- store_test_results:
path: /tmp/cypress
- store_artifacts:
path: /tmp/artifacts
"desktop-gui-integration-tests-2x":
<<: *defaults
parallelism: 2
steps:
- attach_workspace:
at: ~/
- run:
command: npm run build-prod
working_directory: packages/desktop-gui
- run:
command: |
CYPRESS_KONFIG_ENV=production \
CYPRESS_RECORD_KEY=$PACKAGES_RECORD_KEY \
npm run cypress:run -- --record --parallel --group 2x-desktop-gui
working_directory: packages/desktop-gui
- store_test_results:
path: /tmp/cypress
- store_artifacts:
path: /tmp/artifacts
"reporter-integration-tests":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
command: npm run build-prod
working_directory: packages/reporter
- run:
command: |
CYPRESS_KONFIG_ENV=production \
CYPRESS_RECORD_KEY=$PACKAGES_RECORD_KEY \
npm run cypress:run -- --record --parallel --group reporter
working_directory: packages/reporter
- store_test_results:
path: /tmp/cypress
- store_artifacts:
path: /tmp/artifacts
"run-launcher":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
command: node index.js
working_directory: packages/launcher
build-binary:
<<: *defaults
shell: /bin/bash --login
steps:
- run:
name: Check environment variables before code sign (if on Mac)
# NOTE
# our Mac 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 "develop" and "master" branches
# but if you need to really build and sign a Mac binary in a PR
# set variable CSC_FOR_PULL_REQUEST=true
command: |
set -e
if [[ "$OSTYPE" == "darwin"* ]]; then
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
else
echo "Not Mac platform, skipping code sign setup"
fi
- attach_workspace:
at: ~/
- run: $(npm bin)/print-arch
- run:
environment:
DEBUG: electron-builder,electron-osx-sign*
command: npm run binary-build -- --platform $PLATFORM --version $NEXT_DEV_VERSION
- run: npm run binary-zip -- --platform $PLATFORM
- run: ls -l *.zip
- run:
name: upload unique binary
command: |
node scripts/binary.js upload-unique-binary \
--file cypress.zip \
--version $NEXT_DEV_VERSION
- run: cat binary-url.json
- run: mkdir /tmp/urls
- run: cp binary-url.json /tmp/urls
- run: cp cypress.zip /tmp/urls
- run: ls /tmp/urls
- persist_to_workspace:
root: /tmp/urls
paths:
- binary-url.json
- cypress.zip
"test-kitchensink-against-staging":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
name: Cloning test project
command: git clone https://github.com/cypress-io/cypress-example-kitchensink.git /tmp/repo
- run:
name: Install prod dependencies
command: npm install --production
working_directory: /tmp/repo
- run:
name: Example server
command: npm start
working_directory: /tmp/repo
background: true
- run:
name: Run Kitchensink example project
command: |
CYPRESS_PROJECT_ID=$TEST_KITCHENSINK_PROJECT_ID \
CYPRESS_RECORD_KEY=$TEST_KITCHENSINK_RECORD_KEY \
CYPRESS_ENV=staging \
CYPRESS_video=false \
npm run cypress:run -- --project /tmp/repo --record
"test-against-staging":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
name: Cloning test project
command: git clone https://github.com/cypress-io/cypress-test-tiny.git /tmp/repo
- run:
name: Run test project
command: |
CYPRESS_PROJECT_ID=$TEST_TINY_PROJECT_ID \
CYPRESS_RECORD_KEY=$TEST_TINY_RECORD_KEY \
CYPRESS_ENV=staging \
npm run cypress:run -- --project /tmp/repo --record
"build-npm-package":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
name: bump NPM version
command: npm --no-git-tag-version version $NEXT_DEV_VERSION
- run:
name: build NPM package
working_directory: cli
command: npm run build
- run:
command: ls -la types
working_directory: cli/build
- run:
name: list NPM package contents
working_directory: cli/build
command: npm run size
- run:
name: pack NPM package
working_directory: cli/build
command: npm pack
- run:
name: list created NPM package
working_directory: cli/build
command: ls -l
# created file should have filename cypress-<version>.tgz
- run:
name: upload NPM package
command: |
node scripts/binary.js upload-npm-package \
--file cli/build/cypress-$NEXT_DEV_VERSION.tgz \
--version $NEXT_DEV_VERSION
- run: cat npm-package-url.json
- run: mkdir /tmp/urls
- run: cp cli/build/cypress-$NEXT_DEV_VERSION.tgz /tmp/urls/cypress.tgz
- run: cp npm-package-url.json /tmp/urls
- run: ls /tmp/urls
- persist_to_workspace:
root: /tmp/urls
paths:
- npm-package-url.json
- cypress.tgz
"test-binary-and-npm-against-other-projects":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- attach_workspace:
at: /tmp/urls
- run: ls -la /tmp/urls
- run: cat /tmp/urls/*.json
- run: mkdir /tmp/testing
- run:
name: create dummy package
working_directory: /tmp/testing
command: npm init -y
- run:
# install NPM from unique urls
name: Install Cypress
command: |
node scripts/test-unique-npm-and-binary.js \
--npm /tmp/urls/npm-package-url.json \
--binary /tmp/urls/binary-url.json \
--cwd /tmp/testing
- run:
name: Verify Cypress binary
working_directory: /tmp/testing
command: $(npm bin)/cypress verify
- run:
name: Post pre-release install comment
command: |
node scripts/add-install-comment.js \
--npm /tmp/urls/npm-package-url.json \
--binary /tmp/urls/binary-url.json
- run:
name: Running other test projects with new NPM package and binary
command: |
node scripts/test-other-projects.js \
--npm /tmp/urls/npm-package-url.json \
--binary /tmp/urls/binary-url.json \
--provider circle
"test-npm-module-and-verify-binary":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- attach_workspace:
at: /tmp/urls
# make sure we have cypress.zip received
- run: ls -l /tmp/urls/cypress.zip
# build NPM package
- run:
command: npm run build
working_directory: cli
- 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=/tmp/urls/cypress.zip npm i /tmp/urls/cypress.tgz
- run:
name: Verify Cypress binary
working_directory: test-binary
command: $(npm bin)/cypress verify
# install NPM + binary zip and run against staging API
"test-binary-against-staging":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- attach_workspace:
at: /tmp/urls
# make sure we have the binary
- run: ls -l /tmp/urls/cypress.zip
# make sure we have the NPM package
- run: ls -l /tmp/urls/cypress.tgz
- run:
name: Cloning test project
command: git clone https://github.com/cypress-io/cypress-test-tiny.git /tmp/cypress-test-tiny
- run:
name: Install Cypress
working_directory: /tmp/cypress-test-tiny
# force installing the freshly built binary
command: CYPRESS_INSTALL_BINARY=/tmp/urls/cypress.zip npm i /tmp/urls/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_ENV=staging \
$(npm bin)/cypress run --record
"test-binary-against-kitchensink":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- attach_workspace:
at: /tmp/urls
- run:
name: Cloning kitchensink project
command: git clone --depth 1 https://github.com/cypress-io/cypress-example-kitchensink.git /tmp/kitchensink
- run:
command: npm install
working_directory: /tmp/kitchensink
- run:
name: Install Cypress
working_directory: /tmp/kitchensink
# force installing the freshly built binary
command: CYPRESS_INSTALL_BINARY=/tmp/urls/cypress.zip npm i /tmp/urls/cypress.tgz
- run:
working_directory: /tmp/kitchensink
command: npm run build
- run:
working_directory: /tmp/kitchensink
command: npm start
background: true
- run:
working_directory: /tmp/kitchensink
command: npm run e2e
linux-workflow: &linux-workflow
jobs:
- build
- lint:
name: Linux lint
requires:
- build
- lint-types:
requires:
- build
# unit, integration and e2e tests
- unit-tests:
requires:
- build
- server-unit-tests:
requires:
- build
- server-integration-tests:
requires:
- build
- server-performance-tests:
requires:
- build
- server-e2e-tests-1:
requires:
- build
- server-e2e-tests-2:
requires:
- build
- server-e2e-tests-3:
requires:
- build
- server-e2e-tests-4:
requires:
- build
- server-e2e-tests-5:
requires:
- build
- server-e2e-tests-6:
requires:
- build
- server-e2e-tests-7:
requires:
- build
- server-e2e-tests-8:
requires:
- build
- driver-integration-tests-3x:
requires:
- build
- desktop-gui-integration-tests-2x:
requires:
- build
- reporter-integration-tests:
requires:
- build
- run-launcher:
requires:
- build
# various testing scenarios, like building full binary
# and testing it on a real project
- test-against-staging:
filters:
branches:
only:
- develop
requires:
- build
- test-kitchensink-against-staging:
filters:
branches:
only:
- develop
requires:
- build
- build-npm-package:
filters:
branches:
only:
- develop
requires:
- build
- build-binary:
filters:
branches:
only:
- develop
requires:
- build
- test-binary-and-npm-against-other-projects:
filters:
branches:
only:
- develop
requires:
- build-npm-package
- build-binary
- test-npm-module-and-verify-binary:
filters:
branches:
only:
- develop
requires:
- build-npm-package
- build-binary
- test-binary-against-staging:
filters:
branches:
only:
- develop
requires:
- build-npm-package
- build-binary
- test-binary-against-kitchensink:
filters:
branches:
only:
- develop
requires:
- build-npm-package
- build-binary
mac-workflow: &mac-workflow
jobs:
- build:
name: Mac build
executor: mac
- lint:
name: Mac lint
executor: mac
requires:
- Mac build
# maybe run unit tests?
- build-npm-package:
name: Mac NPM package
executor: mac
filters:
branches:
only:
- develop
- test-example-repos-on-mac-4526
requires:
- Mac build
- build-binary:
name: Mac binary
executor: mac
context: org-global
filters:
branches:
only:
- develop
- binary-metadata
- test-example-repos-on-mac-4526
requires:
- Mac build
- test-binary-against-kitchensink:
name: Test Mac binary against kitchensink
executor: mac
filters:
branches:
only:
- develop
requires:
- Mac NPM package
- Mac binary
- test-binary-against-staging:
name: Test Mac binary against staging
executor: mac
filters:
branches:
only:
- develop
requires:
- Mac NPM package
- Mac binary
- test-binary-and-npm-against-other-projects:
name: Test Mac binary against other projects
executor: mac
filters:
branches:
only:
- develop
- test-example-repos-on-mac-4526
requires:
- Mac NPM package
- Mac binary
workflows:
linux:
<<: *linux-workflow
mac:
<<: *mac-workflow