Last active
October 27, 2022 19:30
-
-
Save heridev/24fafeb2ed1e4d145faf143ebb437fb4 to your computer and use it in GitHub Desktop.
Code for blog post - How to architect integration or End-to-end(E2E) or system tests for frontend Single Page Applications
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Jest and Cypress(e2e) tests configuration for CircleCi | |
version: 2.1 | |
orbs: | |
cypress: cypress-io/cypress@1 | |
jest: blimmer/[email protected] | |
executors: | |
with-cypress-node-14-17: | |
docker: | |
- image: cypress/base:14.17.0 | |
jobs: | |
measure-memory: | |
executor: with-cypress-node-14-17 | |
steps: | |
- run: | |
command: cat /sys/fs/cgroup/memory/memory.max_usage_in_bytes | |
when: always | |
workflows: | |
build: | |
jobs: | |
# Coming from Jest's orb | |
- jest/test: | |
name: Run yarn jest | |
executor: with-cypress-node-14-17 | |
package-manager: yarn | |
# Coming from Cypress's orb | |
- cypress/install: | |
name: Yarn install | |
executor: with-cypress-node-14-17 | |
install-command: yarn install --frozen-lockfile | |
# Coming from Cypress's orb | |
- cypress/run: | |
name: Yarn start and npx cypress run | |
executor: with-cypress-node-14-17 | |
store_artifacts: true | |
requires: | |
- Yarn install | |
parallel: true | |
parallelism: 3 | |
yarn: true | |
start: yarn start | |
- measure-memory: | |
requires: | |
- Yarn start and npx cypress run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment