File tree Expand file tree Collapse file tree 1 file changed +20
-6
lines changed Expand file tree Collapse file tree 1 file changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -469,12 +469,26 @@ commands:
469
469
- run :
470
470
command : |
471
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>>
472
+
473
+ if [[ -v MAIN_RECORD_KEY ]]; then
474
+ # internal PR
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
+ CYPRESS_KONFIG_ENV=production \
487
+ PERCY_PARALLEL_NONCE=$CIRCLE_SHA1 \
488
+ PERCY_ENABLE=${PERCY_TOKEN:-0} \
489
+ PERCY_PARALLEL_TOTAL=-1 \
490
+ $cmd yarn workspace @packages/runner cypress:run --browser <<parameters.browser>> --spec $TESTFILES
491
+ fi
478
492
- verify-mocha-results
479
493
- store_test_results :
480
494
path : /tmp/cypress
You can’t perform that action at this time.
0 commit comments