From ee0c329647ef03357ebb8210f72b6436d91b4b98 Mon Sep 17 00:00:00 2001 From: KHeo Date: Thu, 5 May 2022 15:26:54 +0900 Subject: [PATCH] runner tests. --- circle.yml | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/circle.yml b/circle.yml index 6d25a7b770bf..99923deef7a0 100644 --- a/circle.yml +++ b/circle.yml @@ -469,12 +469,26 @@ commands: - run: command: | cmd=$([[ <> == '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-<> --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-<> --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 <> --spec $TESTFILES + fi - verify-mocha-results - store_test_results: path: /tmp/cypress