Skip to content

Instantly share code, notes, and snippets.

@Ebazhanov
Created August 18, 2021 21:06
Show Gist options
  • Save Ebazhanov/6b0434132145e0b1ef67b07201c6cde0 to your computer and use it in GitHub Desktop.
Save Ebazhanov/6b0434132145e0b1ef67b07201c6cde0 to your computer and use it in GitHub Desktop.
version: 2
jobs:
build:
working_directory: ~/tmp
docker:
- image: circleci/node:latest-browsers
environment:
TERM: xterm
steps:
- checkout
- restore_cache:
name: Restore package.json cache
key: v1-deps-{{ .Branch }}-{{ checksum "package.json" }}
- run: yarn install
- save_cache:
key: v1-deps-{{ .Branch }}-{{ checksum "package.json" }}
paths:
- ~/.npm
- ~/.cache
- persist_to_workspace:
root: ~/
paths:
- .cache
- tmp
test1:
working_directory: ~/tmp
docker:
- image: circleci/node:latest-browsers
environment:
TERM: xterm
steps:
- attach_workspace:
at: ~/
- run:
name: Running cypress tests 1
command: yarn cy:run:part_1
- store_artifacts:
path: cypress/videos
- store_artifacts:
path: cypress/screenshots
test2:
working_directory: ~/tmp
docker:
- image: circleci/node:latest-browsers
environment:
TERM: xterm
steps:
- attach_workspace:
at: ~/
- run:
name: Running cypress tests 2
command: yarn cy:run:part_2
- store_artifacts:
path: cypress/videos
- store_artifacts:
path: cypress/screenshots
workflows:
version: 2
build_and_test:
jobs:
- build
- test1:
requires:
- build
- test2:
requires:
- build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment