Skip to content

Commit c08a2c3

Browse files
committed
runner config.
1 parent 9c878bc commit c08a2c3

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

circle.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -469,12 +469,26 @@ commands:
469469
- run:
470470
command: |
471471
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
478492
- verify-mocha-results
479493
- store_test_results:
480494
path: /tmp/cypress

0 commit comments

Comments
 (0)