Skip to content

Instantly share code, notes, and snippets.

@heridev
Last active October 27, 2022 19:30
Show Gist options
  • Save heridev/24fafeb2ed1e4d145faf143ebb437fb4 to your computer and use it in GitHub Desktop.
Save heridev/24fafeb2ed1e4d145faf143ebb437fb4 to your computer and use it in GitHub Desktop.

Revisions

  1. heridev revised this gist Oct 27, 2022. No changes.
  2. heridev revised this gist Oct 27, 2022. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions 999-circleci.yml
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    # Jest and Cypress(e2e) tests configuration for CircleCi
    version: 2.1
    orbs:
    cypress: cypress-io/cypress@1
  3. heridev renamed this gist Oct 27, 2022. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. heridev created this gist Oct 27, 2022.
    42 changes: 42 additions & 0 deletions circleci.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,42 @@
    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