Skip to content

Instantly share code, notes, and snippets.

@heridev
Last active October 27, 2022 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heridev/24fafeb2ed1e4d145faf143ebb437fb4 to your computer and use it in GitHub Desktop.
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
# Jest and Cypress(e2e) tests configuration for CircleCi
version: 2.1
orbs:
cypress: cypress-io/cypress@1
jest: blimmer/jest@1.1.1
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