Files
cypress/circle.yml
T
Gleb Bahmutov 0fc4dab3c7 Run Cypress e2e tests in docs folder on CI (#52)
* docs: run hexo server and cypress e2e tests in parallel

* docs: enable e2e docs tests on CircleCI

* pass record key via env CYPRESS_DOCS_RECORD_KEY to cypress run command

* docs: renaming e2e task names

* ts: cache node_modules folder

* docs: unit test helpful message

* typo in script name

* cache .cypress folder

* do not ignore fixtures folder
2017-05-18 09:04:15 -04:00

112 lines
3.4 KiB
YAML

machine:
node:
version: 6.5.0
dependencies:
# CircleCI caching
# https://circleci.com/docs/1.0/how-cache-works/
cache_directories:
# downloaded Electron binary
- "~/.electron"
# downloaded Cypress binary
- "~/.cypress"
# docs folder needs modules and Cypress binary
- docs/node_modules
# could not use wildcard format, so list every subfolder
- packages/coffee/node_modules
- packages/desktop-gui/node_modules
- packages/driver/node_modules
- packages/electron/node_modules
- packages/example/node_modules
- packages/extension/node_modules
- packages/https-proxy/node_modules
- packages/launcher/node_modules
- packages/reporter/node_modules
- packages/runner/node_modules
- packages/server/node_modules
- packages/socket/node_modules
- packages/static/node_modules
- packages/ts/node_modules
test:
## e2e (1)
## desktop-gui (2)
## driver (3)
## example (4)
## cli (5)
## extension (5)
## https-proxy (5)
## launcher (5)
## reporter (5)
## runner (5)
## server (5, 6)
override:
#
# things to run in the 1st CI container
#
# run linter (fast)
- if [ $CIRCLE_NODE_INDEX == 0 ]; then npm run all lint; fi:
parallel: true
# run unit tests (fast)
# separate commands for better GUI view
- if [ $CIRCLE_NODE_INDEX == 0 ]; then npm run all test -- --package coffee; fi:
parallel: true
- if [ $CIRCLE_NODE_INDEX == 0 ]; then npm run all test -- --package desktop-gui; fi:
parallel: true
- if [ $CIRCLE_NODE_INDEX == 0 ]; then npm run all test -- --package electron; fi:
parallel: true
- if [ $CIRCLE_NODE_INDEX == 0 ]; then npm run all test -- --package extension; fi:
parallel: true
- if [ $CIRCLE_NODE_INDEX == 0 ]; then npm run all test -- --package https-proxy; fi:
parallel: true
- if [ $CIRCLE_NODE_INDEX == 0 ]; then npm run all test -- --package launcher; fi:
parallel: true
- if [ $CIRCLE_NODE_INDEX == 0 ]; then npm run all test -- --package reporter; fi:
parallel: true
- if [ $CIRCLE_NODE_INDEX == 0 ]; then npm run all test -- --package runner; fi:
parallel: true
- if [ $CIRCLE_NODE_INDEX == 0 ]; then npm run all test -- --package server; fi:
parallel: true
- if [ $CIRCLE_NODE_INDEX == 0 ]; then npm run all test -- --package socket; fi:
parallel: true
- if [ $CIRCLE_NODE_INDEX == 0 ]; then npm run all test -- --package static; fi:
parallel: true
# run E2E tests against docs site (reasonably fast)
- if [ $CIRCLE_NODE_INDEX == 0 ]; then cd docs && npm run test-e2e; fi:
parallel: true
## temporarily commenting out until these all pass locally
# - if [ $CIRCLE_NODE_INDEX == 0 ]; then npm run all test-integration-once -- --package server; fi:
# parallel: true
#
# things to run in the 2nd CI container
#
- if [ $CIRCLE_NODE_INDEX == 1 ]; then npm run all test -- --package driver; fi:
parallel: true
#
# things to run in the 3rd CI container
#
## temporarily commenting out until these all pass locally
# - if [ $CIRCLE_NODE_INDEX == 2 ]; then npm run all test-e2e-once -- --package server; fi:
# parallel: true
# Example project E2E tests
# Hanging now, so commented out
# - if [ $CIRCLE_NODE_INDEX == 0 ]; then npm start -- --project ../example/; fi:
# parallel: true