-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.yml
94 lines (80 loc) · 2.16 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
references:
cypress: &circleci_image
circleci/node:latest-browsers
working_directory: &working_directory
~/tmp
aliases:
- &deploy_environment
docker:
- image: *circleci_image
environment:
TERM: xterm
resource_class: small
working_directory: *working_directory
- &restore_package_json_cache
name: Restore package.json cache
key: v2-deps-{{ .Branch }}-{{ checksum "package.json" }}
- &save_package_json_cache
name: Save cache both yarn and Cypress!
key: v2-deps-{{ .Branch }}-{{ checksum "package.json" }}
paths:
- ~/.cache
- &run_e2e_cypress_tests_part_1
name: Run cypress E2E tests
command: yarn cy:run:part_1
- &run_e2e_cypress_tests_part_2
name: Run cypress E2E tests
command: yarn cy:run:part_2
- &cypress_video_artifacts
name: Uploading cypress/videos artifacts
path: cypress/videos
- &cypress_screenshots_artifacts
name: Uploading cypress/screenshots artifacts
path: cypress/screenshots
- &install_yarn
name: Install all dependencies for a project
command: yarn install
- &persist_to_workspace
persist_to_workspace:
root: ~/
paths:
- .cache
- tmp
- &attach_workspace
attach_workspace:
at: ~/
version: 2
jobs:
build:
<<: *deploy_environment
steps:
- checkout
- restore_cache: *restore_package_json_cache
- run: *install_yarn
- save_cache: *save_package_json_cache
- *persist_to_workspace
tests_part_1:
<<: *deploy_environment
steps:
- *attach_workspace
- run: *run_e2e_cypress_tests_part_1
- store_artifacts: *cypress_video_artifacts
- store_artifacts: *cypress_screenshots_artifacts
tests_part_2:
<<: *deploy_environment
steps:
- *attach_workspace
- run: *run_e2e_cypress_tests_part_2
- store_artifacts: *cypress_video_artifacts
- store_artifacts: *cypress_screenshots_artifacts
workflows:
version: 2
build_and_test:
jobs:
- build
- tests_part_1:
requires:
- build
- tests_part_2:
requires:
- build