Skip to content

Commit

Permalink
ci(834): use circle CI test splitting for cypress (#841)
Browse files Browse the repository at this point in the history
* ci(834): try alternate approach

* ci(834): export var

* ci(834): fix glob path

* ci(834): edit glob

* ci(834): restructure

* ci(834): remove cypress-parallel, run comps in parallel

* ci(834): drop amount of component runners
  • Loading branch information
James Spencer authored Apr 21, 2023
1 parent bd456c1 commit 3835cd0
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 288 deletions.
7 changes: 4 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ executors:
cypress:
docker:
- image: cypress/browsers:node16.13.0-chrome95-ff94
resource_class: xlarge
resource_class: medium

java:
docker:
Expand Down Expand Up @@ -806,6 +806,7 @@ jobs:
test_e2e_comps:
<<: *cypress_defaults
executor: cypress
parallelism: 10
steps:
- checkout
- attach_workspace:
Expand All @@ -823,14 +824,14 @@ jobs:
test_e2e_docs:
<<: *cypress_defaults
executor: cypress
parallelism: 16
steps:
- checkout
- attach_workspace:
at: ~/project
- run:
name: Run Docs Site Functional Tests
command: |
yarn e2e:docs:ci
command: yarn e2e:docs:ci
- store_artifacts:
path: cypress/screenshots
- store_artifacts:
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@
"e2e:serve": "http-server e2e/dist -p 8080",
"e2e:comps:run": "cypress run --config-file cypress.components.config.ts",
"e2e:comps:open": "cypress open --config-file cypress.components.config.ts",
"e2e:comps:parallel": "cypress-parallel -s e2e:comps:run -t 4 -d cypress/components/**/*.cy.{js,jsx,ts,tsx}",
"e2e:comps:parallel": "yarn e2e:comps:run --spec $(circleci tests glob \"cypress/components/**/*.cy.{js,jsx,ts,tsx}\" | circleci tests split | paste -sd ',')",
"e2e:docs:run": "cypress run --config-file cypress.docs.config.ts",
"e2e:docs:open": "cypress open --config-file cypress.docs.config.ts",
"e2e:docs:parallel": "cypress-parallel -s e2e:docs:run -t 4 -d cypress/site/functional/**/*.cy.{js,jsx,ts,tsx}",
"e2e:docs:parallel": "yarn e2e:docs:run --spec $(circleci tests glob \"cypress/site/functional/**/*.cy.{js,jsx,ts,tsx}\" | circleci tests split | paste -sd ',')",
"e2e:comps:ci": "start-server-and-test e2e:serve 8080 'TZ=UTC yarn e2e:comps:parallel'",
"e2e:docs:ci": "yarn e2e:generate:a11ytests:web && start-server-and-test serve:docs 8081 'TZ=UTC && yarn e2e:docs:parallel'",
"e2e:visual:docs:ci:percy": "start-server-and-test serve:docs 8081 'TZ=UTC percy exec -- cypress run --config-file cypress.docs.percy.config.ts'",
Expand Down Expand Up @@ -154,7 +154,6 @@
"cypress": "^12.3.0",
"cypress-axe": "^1.2.0",
"cypress-multi-reporters": "^1.6.2",
"cypress-parallel": "^0.12.0",
"eslint": "^8.3.0",
"eslint-config-airbnb-typescript": "^12.3.1",
"eslint-config-next": "^13.0.7",
Expand Down
Loading

0 comments on commit 3835cd0

Please sign in to comment.