This repository has been archived by the owner on Jun 13, 2023. It is now read-only.
forked from cypress-io/cypress-example-kitchensink
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcircle.yml
93 lines (80 loc) · 3.43 KB
/
circle.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
version: 2
jobs:
build:
parallelism: 4
docker:
- image: cypress/base:12
environment:
## this enables colors in the output
TERM: xterm
# In production you should use endpoint https://api.knapsackpro.com
# which is default so it means you don't need to set KNAPSACK_PRO_ENDPOINT
# Below endpoint is just for internal tests by KnapsackPro developers.
KNAPSACK_PRO_ENDPOINT: https://api-staging.knapsackpro.com
working_directory: ~/app
steps:
# dependencies
# clone @knapsack-pro/core project
- run:
name: Checkout code of @knapsack-pro/core
command: cd ~ && (git clone -b $CIRCLE_BRANCH --single-branch https://github.com/KnapsackPro/knapsack-pro-core-js.git || git clone --single-branch https://github.com/KnapsackPro/knapsack-pro-core-js.git)
- restore_cache:
keys:
- v1-knapsack-pro-core-{{ checksum "~/knapsack-pro-core-js/package.json" }}
# fallback to the latest cache if no exact match is found
- v1-knapsack-pro-core-
- run: cd ~/knapsack-pro-core-js && npm install
- run: cd ~/knapsack-pro-core-js && npm run build
- run: cd ~/knapsack-pro-core-js && npm link
- save_cache:
name: Saving Cache of @knapsack-pro/core
key: v1-knapsack-pro-core-{{ checksum "~/knapsack-pro-core-js/package.json" }}
paths:
- ~/knapsack-pro-core-js/node_modules
# clone @knapsack-pro/cypress project
- run:
name: Checkout code of @knapsack-pro/cypress
command: cd ~ && (git clone -b $CIRCLE_BRANCH --single-branch https://github.com/KnapsackPro/knapsack-pro-cypress.git || git clone --single-branch https://github.com/KnapsackPro/knapsack-pro-cypress.git)
- restore_cache:
keys:
- v1-knapsack-pro-cypress-{{ checksum "~/knapsack-pro-cypress/package.json" }}
# fallback to the latest cache if no exact match is found
- v1-knapsack-pro-cypress-
- run: cd ~/knapsack-pro-cypress && npm install
- run: cd ~/knapsack-pro-cypress && npm link @knapsack-pro/core
- run: cd ~/knapsack-pro-cypress && npm run build
- run: cd ~/knapsack-pro-cypress && npm link
- save_cache:
name: Saving Cache of @knapsack-pro/cypress
key: v1-knapsack-pro-cypress-{{ checksum "~/knapsack-pro-cypress/package.json" }}
paths:
- ~/knapsack-pro-cypress/node_modules
# cypress-example-kitchensink project
- checkout
- restore_cache:
keys:
- v2-app-{{ .Branch }}-{{ checksum "package.json" }}
- v2-app-{{ .Branch }}
- v2-app-
- run:
name: Install Dependencies
command: npm ci
# use local version of @knapsack-pro/cypress to test it
- run: npm link @knapsack-pro/cypress
- save_cache:
key: v2-app-{{ .Branch }}-{{ checksum "package.json" }}
paths:
- ~/.npm
- ~/.cache
- .git
#- run: npm run types
# it requires Record Key for Cypress
#- run: npm run test:ci:record
# don't run the whole test suite for now
# - run: npm run test
# run tests with @knapsack-pro/cypress
- run:
name: Run http server with the app
command: npm run start
background: true
- run: $(npm bin)/knapsack-pro-cypress --record false