Skip to content

Commit

Permalink
Merge pull request #5546 from flexion/experiment-parallelize-cypress
Browse files Browse the repository at this point in the history
Parallelize smoke tests in circle deploys
  • Loading branch information
jimlerza authored Nov 15, 2024
2 parents 6367788 + f9b7514 commit 4dd6155
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
9 changes: 4 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,13 @@ jobs:
./scripts/reindex/disable-reindex-cron.sh
smoketests:
parallelism: 6
docker:
- image: *efcms-docker-image
aws_auth:
aws_access_key_id: $AWS_ACCESS_KEY_ID
aws_secret_access_key: $AWS_SECRET_ACCESS_KEY
resource_class: medium+
resource_class: large
steps:
- git-shallow-clone/checkout
- npm-and-cypress-install
Expand All @@ -366,7 +367,7 @@ jobs:
./scripts/env/env-for-circle.sh
- run:
name: 'Cypress Smoke Tests'
command: npm run cypress:smoketests
command: find cypress/deployed-and-local/integration -type f -name "*.cy.ts" | circleci tests run --split-by=timings --command 'paste -sd, - | xargs -I {} ./scripts/run-cypress.sh -s -t {}'
- store_artifacts:
path: /root/project/cypress/deployed-and-local/videos/

Expand Down Expand Up @@ -936,12 +937,10 @@ workflows:
<<: *only-deployed-lower-environments
- docker-image-zipper:
<<: *only-deployed-lower-environments
requires:
- deploy
- migrate:
<<: *only-deployed-lower-environments
requires:
- docker-image-zipper
- deploy
- wait-for-migration:
<<: *only-deployed-lower-environments
type: approval
Expand Down
5 changes: 3 additions & 2 deletions scripts/run-cypress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@ if [ -n "${OPEN}" ]; then
./node_modules/.bin/cypress open --browser "${BROWSER}" -C "${CONFIG_FILE}"
else
if [ -n "${RUN_SPECIFIC_TEST}" ]; then
RUN_SPECIFIC_TEST="${RUN_SPECIFIC_TEST// /,}"
./node_modules/.bin/cypress run --browser "${BROWSER}" -C "${CONFIG_FILE}" --spec "${RUN_SPECIFIC_TEST}"
else
else
./node_modules/.bin/cypress run --browser "${BROWSER}" -C "${CONFIG_FILE}"
fi
fi
fi

0 comments on commit 4dd6155

Please sign in to comment.