forked from cornerstonejs/cornerstone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
151 lines (141 loc) · 3.46 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
version: 2.1
orbs:
coveralls: coveralls/[email protected]
puppeteer: threetreeslight/[email protected]
defaults: &defaults
working_directory: ~/repo
docker:
- image: circleci/node@sha256:a80b0f7d12ed539c1c40dcdc454433a0a690f1972a038b0d4dc85eaa34fb48d8
jobs:
checkout_code:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/repo
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- puppeteer/install
- run: npm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- persist_to_workspace:
root: ~/repo
paths: .
test_and_report:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
- run: npm install
- run: npm rebuild
- run:
name: Install codecov
command: npm install --save-dev codecov
- run:
name: Tests && Codecov Report
command: npm run test
- coveralls/upload
- store_artifacts:
path: ./coverage/
prefix: tests
- store_artifacts:
path: coverage
prefix: coverage
- store_test_results:
path: ./coverage/
build:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
- run: npm install
- run: npm rebuild
- run:
name: Build our app
command: npm run build
- persist_to_workspace:
root: ~/repo
paths: .
publish_npm:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
- run: npm install
- run:
name: Avoid hosts unknown for github
command: mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
- run:
name: Publish using Semantic Release
command: npx semantic-release
- persist_to_workspace:
root: ~/repo
paths: .
publish_docs:
working_directory: ~/repo
docker:
- image: cimg/ruby:3.0.2-node
environment:
BUNDLE_PATH: ~/repo/vendor/bundle
steps:
- attach_workspace:
at: ~/repo
- run:
name: Avoid hosts unknown for github
command: mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
- run: npm install
- run: sudo npm install gitbook-cli -g
- run:
name: Do Magic
command: sh ~/repo/.circleci/update-docs.sh
workflows:
version: 2
###
# PULL REQUESTS
###
test_build:
jobs:
- checkout_code:
filters:
branches:
ignore:
- master
- feature/*
- hotfix/*
- test_and_report:
requires:
- checkout_code
- build:
requires:
- checkout_code
###
# MERGE: MASTER
###
test_build_publish:
jobs:
- checkout_code:
filters:
branches:
only: master
- test_and_report:
requires:
- checkout_code
- build:
requires:
- checkout_code
- publish_npm:
requires:
- checkout_code
- test_and_report
- build
# - build_examples:
# requires:
# - publish_npm
- publish_docs:
requires:
- publish_npm