Skip to content

Commit

Permalink
runner tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
sainthkh committed May 5, 2022
1 parent 9c878bc commit ee0c329
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions circle.yml
Expand Up @@ -469,12 +469,26 @@ commands:
- run:
command: |
cmd=$([[ <<parameters.percy>> == 'true' ]] && echo 'yarn percy exec --parallel -- --') || true
CYPRESS_KONFIG_ENV=production \
CYPRESS_RECORD_KEY=$MAIN_RECORD_KEY \
PERCY_PARALLEL_NONCE=$CIRCLE_SHA1 \
PERCY_ENABLE=${PERCY_TOKEN:-0} \
PERCY_PARALLEL_TOTAL=-1 \
$cmd yarn workspace @packages/runner cypress:run --record --parallel --group runner-integration-<<parameters.browser>> --browser <<parameters.browser>>
if [[ -v MAIN_RECORD_KEY ]]; then
# internal PR
CYPRESS_KONFIG_ENV=production \
CYPRESS_RECORD_KEY=$MAIN_RECORD_KEY \
PERCY_PARALLEL_NONCE=$CIRCLE_SHA1 \
PERCY_ENABLE=${PERCY_TOKEN:-0} \
PERCY_PARALLEL_TOTAL=-1 \
$cmd yarn workspace @packages/runner cypress:run --record --parallel --group runner-integration-<<parameters.browser>> --browser <<parameters.browser>>
else
# external PR
TESTFILES=$(circleci tests glob "cypress/integration/**/*spec.*" | circleci tests split --total=$CIRCLE_NODE_TOTAL)
echo "Test files for this machine are $TESTFILES"
CYPRESS_KONFIG_ENV=production \
PERCY_PARALLEL_NONCE=$CIRCLE_SHA1 \
PERCY_ENABLE=${PERCY_TOKEN:-0} \
PERCY_PARALLEL_TOTAL=-1 \
$cmd yarn workspace @packages/runner cypress:run --browser <<parameters.browser>> --spec $TESTFILES
fi
- verify-mocha-results
- store_test_results:
path: /tmp/cypress
Expand Down

0 comments on commit ee0c329

Please sign in to comment.