@@ -9,7 +9,6 @@ macBuildFilters: &macBuildFilters
99 only :
1010 - develop
1111 - v5.0-release
12- - install-node-on-circleci-mac
1312
1413defaults : &defaults
1514 parallelism : 1
@@ -61,37 +60,12 @@ executors:
6160 # https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions
6261 mac :
6362 macos :
64- # Executor should have Node >= required version
63+ # # Node 12.12.0 (yarn 1.19.1)
6564 xcode : " 11.2.1"
6665 environment :
6766 PLATFORM : mac
6867
6968commands :
70- install-required-node :
71- # https://discuss.circleci.com/t/switch-nodejs-version-on-machine-executor-solved/26675/2
72- description : Install Node version matching .node-version
73- steps :
74- - run :
75- name : Install NVM
76- # TODO: determine why we get the missing .nvmrc file error
77- command : |
78- export NODE_VERSION=$(cat .node-version)
79- echo "Installing Node $NODE_VERSION"
80- cp .node-version .nvmrc
81- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.3/install.sh | bash
82- - run :
83- # https://github.com/nvm-sh/nvm#nvmrc
84- name : Install Node
85- command : |
86- . ./scripts/load-nvm.sh
87- echo "before nvm install"
88- nvm install
89- echo "before nvm use"
90- nvm use
91- echo "before nvm alias default"
92- nvm alias default
93- node --version
94-
9569 install-latest-chrome :
9670 description : Install latest Google Chrome (stable)
9771 parameters :
@@ -280,10 +254,6 @@ commands:
280254 description : Whether to use wait-on to wait on a server to be booted
281255 type : string
282256 default : " "
283- server-start-command :
284- description : Server start command for repo
285- type : string
286- default : " npm start --if-present"
287257 steps :
288258 - attach_workspace :
289259 at : ~/
@@ -320,7 +290,7 @@ commands:
320290 command : npm run build --if-present
321291 - run :
322292 working_directory : /tmp/<<parameters.repo>>
323- command : <<parameters.server- start-command>>
293+ command : npm start --if-present
324294 background : true
325295 - run :
326296 condition : <<parameters.wait-on>>
@@ -393,7 +363,6 @@ jobs:
393363 << : *defaults
394364 steps :
395365 - checkout
396- - install-required-node
397366 - run :
398367 name : Print working folder
399368 command : echo $PWD
@@ -402,36 +371,20 @@ jobs:
402371 command : echo $(yarn global bin)
403372 - run :
404373 name : print Node version
405- command : |
406- . ./scripts/load-nvm.sh
407- echo "nvm use default"
408- nvm use default
409- node -v
374+ command : node -v
410375 - run :
411376 name : print yarn version
412377 command : yarn -v
413- - run :
414- name : check Node version
415- command : |
416- . ./scripts/load-nvm.sh
417- yarn check-node-version
378+ - run : yarn check-node-version
418379
419380 # # make sure the TERM is set to 'xterm' in node (Linux only)
420381 # # else colors (and tests) will fail
421382 # # See the following information
422383 # # * http://andykdocs.de/development/Docker/Fixing+the+Docker+TERM+variable+issue
423384 # # * https://unix.stackexchange.com/questions/43945/whats-the-difference-between-various-term-variables
424- - run :
425- name : Check terminal
426- command : |
427- . ./scripts/load-nvm.sh
428- yarn check-terminal
385+ - run : yarn check-terminal
429386
430- - run :
431- name : Stop .only
432- command : |
433- . ./scripts/load-nvm.sh
434- yarn stop-only-all
387+ - run : yarn stop-only-all
435388
436389 - restore_cache :
437390 name : Restore yarn cache
@@ -442,11 +395,7 @@ jobs:
442395 - run : ls $(yarn global bin)/../lib/node_modules
443396
444397 # try several times, because flaky NPM installs ...
445- - run :
446- name : install and build
447- command : |
448- . ./scripts/load-nvm.sh
449- yarn --frozen-lockfile || yarn --frozen-lockfile
398+ - run : yarn --frozen-lockfile || yarn --frozen-lockfile
450399 - run :
451400 name : Top level packages
452401 command : yarn list --depth=0 || true
@@ -464,13 +413,8 @@ jobs:
464413 steps :
465414 - attach_workspace :
466415 at : ~/
467- - install-required-node
468- # # this will catch ".only"s in js/coffee as well
469- - run :
470- name : Linting 🧹
471- command : |
472- . ./scripts/load-nvm.sh
473- yarn lint
416+ # # this will catch .only's in js/coffee as well
417+ - run : yarn lint
474418 - run :
475419 name : cypress info (dev)
476420 command : node cli/bin/cypress info --dev
@@ -582,18 +526,10 @@ jobs:
582526 steps :
583527 - attach_workspace :
584528 at : ~/
585- - install-required-node
586- - run :
587- name : Mocha tests
588- command : |
589- . ./scripts/load-nvm.sh
590- yarn test-mocha
529+ # make sure mocha runs
530+ - run : yarn test-mocha
591531 # test binary build code
592- - run :
593- name : Test scripts
594- command : |
595- . ./scripts/load-nvm.sh
596- yarn test-scripts
532+ - run : yarn test-scripts
597533
598534 server-unit-tests :
599535 << : *defaults
@@ -1029,7 +965,6 @@ jobs:
1029965 - attach_workspace :
1030966 at : ~/
1031967 - run : $(yarn bin)/print-arch
1032- - install-required-node
1033968 - run :
1034969 environment :
1035970 DEBUG : electron-builder,electron-osx-sign*
@@ -1038,15 +973,8 @@ jobs:
1038973 # if this is a forked pull request, the NEXT_DEV_VERSION environment variable
1039974 # won't be set and we will use default version, since we are not going to
1040975 # upload the dev binary build anywhere
1041- command : |
1042- . ./scripts/load-nvm.sh
1043- node --version
1044- yarn binary-build --platform $PLATFORM --version ${NEXT_DEV_VERSION:-0.0.0-development}
1045- - run :
1046- name : Zip the binary
1047- command : |
1048- . ./scripts/load-nvm.sh
1049- yarn binary-zip --platform $PLATFORM
976+ command : yarn binary-build --platform $PLATFORM --version ${NEXT_DEV_VERSION:-0.0.0-development}
977+ - run : yarn binary-zip --platform $PLATFORM
1050978 # Cypress binary file should be zipped to cypress.zip
1051979 - run : ls -l *.zip
1052980 - store-npm-logs
@@ -1079,7 +1007,6 @@ jobs:
10791007 steps :
10801008 - clone-repo-and-checkout-release-branch :
10811009 repo : cypress-example-kitchensink
1082- - install-required-node
10831010 - run :
10841011 name : Install prod dependencies
10851012 command : yarn --production
@@ -1091,9 +1018,7 @@ jobs:
10911018 background : true
10921019 - run :
10931020 name : Run Kitchensink example project
1094- command : |
1095- . ./scripts/load-nvm.sh
1096- yarn cypress:run --project /tmp/cypress-example-kitchensink
1021+ command : yarn cypress:run --project /tmp/cypress-example-kitchensink
10971022 - store_artifacts :
10981023 path : /tmp/cypress-example-kitchensink/cypress/screenshots
10991024 - store_artifacts :
@@ -1143,20 +1068,13 @@ jobs:
11431068 steps :
11441069 - attach_workspace :
11451070 at : ~/
1146- - install-required-node
1147- - run :
1148- name : Check next dev version
1149- command : |
1150- . ./scripts/load-nvm.sh
1151- yarn check-next-dev-version
1071+ - run : yarn check-next-dev-version
11521072 - run :
11531073 name : bump NPM version
11541074 command : yarn version --no-git-tag-version --new-version ${NEXT_DEV_VERSION:-0.0.0-development}
11551075 - run :
11561076 name : build NPM package
1157- command : |
1158- . ./scripts/load-nvm.sh
1159- yarn build --scope cypress
1077+ command : yarn build --scope cypress
11601078 - run :
11611079 command : ls -la types
11621080 working_directory : cli/build
@@ -1570,16 +1488,6 @@ jobs:
15701488 browser : firefox
15711489 command : " npm run cypress:run"
15721490
1573- " test-binary-against-cypress-realworld-app " :
1574- << : *defaults
1575- steps :
1576- - test-binary-against-repo :
1577- repo : cypress-realworld-app
1578- browser : chrome
1579- server-start-command : " npm run start:ci"
1580- command : " npm run cypress:run"
1581- wait-on : http://localhost:3000
1582-
15831491 test-binary-as-specific-user :
15841492 << : *defaults
15851493 steps :
@@ -1807,7 +1715,7 @@ linux-workflow: &linux-workflow
18071715 branches :
18081716 only :
18091717 - develop
1810- - test-retries
1718+ - v5.0-release
18111719 requires :
18121720 - build-npm-package
18131721 - build-binary :
@@ -1819,7 +1727,7 @@ linux-workflow: &linux-workflow
18191727 branches :
18201728 only :
18211729 - develop
1822- - test-retries
1730+ - v5.0-release
18231731 requires :
18241732 - build-binary
18251733 - test-npm-module-on-minimum-node-version :
@@ -1876,7 +1784,7 @@ linux-workflow: &linux-workflow
18761784 branches :
18771785 only :
18781786 - develop
1879- - test-retries
1787+ - v5.0-release
18801788 requires :
18811789 - upload-npm-package
18821790 - upload-binary
@@ -1923,16 +1831,6 @@ linux-workflow: &linux-workflow
19231831 << : *testBinaryFirefox
19241832 - test-binary-against-piechopper-firefox :
19251833 << : *testBinaryFirefox
1926- - test-binary-against-cypress-realworld-app :
1927- filters :
1928- branches :
1929- only :
1930- - develop
1931- - kevin-v5.0-release-rwa
1932- - v5.0-release
1933- requires :
1934- - build-npm-package
1935- - build-binary
19361834
19371835 - test-binary-as-specific-user :
19381836 name : " test binary as a non-root user"
0 commit comments