@@ -468,13 +468,28 @@ commands:
468
468
- restore_cached_workspace
469
469
- run :
470
470
command : |
471
- cmd=$([[ <<parameters.percy>> == 'true' ]] && echo 'yarn percy exec --parallel -- --') || true
472
- CYPRESS_KONFIG_ENV=production \
473
- CYPRESS_RECORD_KEY=$MAIN_RECORD_KEY \
474
- PERCY_PARALLEL_NONCE=$CIRCLE_SHA1 \
475
- PERCY_ENABLE=${PERCY_TOKEN:-0} \
476
- PERCY_PARALLEL_TOTAL=-1 \
477
- $cmd yarn workspace @packages/runner cypress:run --record --parallel --group runner-integration-<<parameters.browser>> --browser <<parameters.browser>>
471
+ if [[ -v MAIN_RECORD_KEY ]]; then
472
+ # internal PR
473
+
474
+ cmd=$([[ <<parameters.percy>> == 'true' ]] && echo 'yarn percy exec --parallel -- --') || true
475
+ CYPRESS_KONFIG_ENV=production \
476
+ CYPRESS_RECORD_KEY=$MAIN_RECORD_KEY \
477
+ PERCY_PARALLEL_NONCE=$CIRCLE_SHA1 \
478
+ PERCY_ENABLE=${PERCY_TOKEN:-0} \
479
+ PERCY_PARALLEL_TOTAL=-1 \
480
+ $cmd yarn workspace @packages/runner cypress:run --record --parallel --group runner-integration-<<parameters.browser>> --browser <<parameters.browser>>
481
+ else
482
+ # external PR
483
+ TESTFILES=$(circleci tests glob "cypress/integration/**/*spec.*" | circleci tests split --total=$CIRCLE_NODE_TOTAL)
484
+ echo "Test files for this machine are $TESTFILES"
485
+
486
+ cmd=$([[ <<parameters.percy>> == 'true' ]] && echo 'yarn percy exec --parallel -- --') || true
487
+ CYPRESS_KONFIG_ENV=production \
488
+ PERCY_PARALLEL_NONCE=$CIRCLE_SHA1 \
489
+ PERCY_ENABLE=${PERCY_TOKEN:-0} \
490
+ PERCY_PARALLEL_TOTAL=-1 \
491
+ $cmd yarn workspace @packages/runner cypress:run --browser <<parameters.browser>> --spec $TESTFILES
492
+ fi
478
493
- verify-mocha-results
479
494
- store_test_results :
480
495
path : /tmp/cypress
0 commit comments