5
5
- &job-defaults
6
6
working_directory : ~/semaphore
7
7
docker :
8
- # specify the version you desire here
9
- - image : circleci/node:8.16
8
+ # specify the version you desire here
9
+ - image : circleci/node:8.16
10
10
11
11
- &yarn-install
12
12
run :
@@ -22,9 +22,9 @@ aliases:
22
22
- &restore-cache
23
23
name : Restore Yarn Package Cache
24
24
keys :
25
- - yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
26
- # Fallback in case checksum fails
27
- - yarn-packages-{{ .Branch }}-
25
+ - yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
26
+ # Fallback in case checksum fails
27
+ - yarn-packages-{{ .Branch }}-
28
28
29
29
- &save-cache
30
30
name : Save Yarn Package Cache
@@ -33,10 +33,11 @@ aliases:
33
33
34
34
# Branch filter that can be specified for jobs that should only run on publish branches
35
35
# (e.g. master )
36
- - &publish_branches_filter
36
+ - &release_branches_filter
37
37
branches :
38
38
only :
39
- - master
39
+ - master
40
+ - /rc-.*/
40
41
41
42
# Workspace initially persisted by the `install` job, and then enhanced by `test_aio` and
42
43
# `build-npm-packages`.
@@ -51,68 +52,100 @@ jobs:
51
52
setup :
52
53
<< : *job-defaults
53
54
steps :
54
- - checkout
55
- - restore_cache : *restore-cache
56
- - *yarn-install
57
- - save_cache : *save-cache
58
- # Persist any changes at this point to be reused by further jobs.
59
- # **NOTE 1 **: Folders persisted here should be kept in sync with `var_13: &attach_workspace`.
60
- # **NOTE 2 **: To add new content to the workspace, always persist on the same root.
61
- - persist_to_workspace :
62
- root : ~/
63
- paths :
64
- - ./semaphore
55
+ - checkout
56
+ - restore_cache : *restore-cache
57
+ - *yarn-install
58
+ - save_cache : *save-cache
59
+ # Persist any changes at this point to be reused by further jobs.
60
+ # **NOTE 1 **: Folders persisted here should be kept in sync with `var_13: &attach_workspace`.
61
+ # **NOTE 2 **: To add new content to the workspace, always persist on the same root.
62
+ - persist_to_workspace :
63
+ root : ~/
64
+ paths :
65
+ - ./semaphore
65
66
66
67
lint :
67
68
<< : *job-defaults
68
69
steps :
69
- - *attach-workspace
70
- - run : yarn lint --format junit -o reports/junit/js-lint-results.xml
71
- - store_test_results :
72
- path : reports/junit
70
+ - *attach-workspace
71
+ - run : yarn lint --format junit -o reports/junit/js-lint-results.xml
72
+ - store_test_results :
73
+ path : reports/junit
73
74
74
75
test :
75
76
<< : *job-defaults
76
77
steps :
77
- - *attach-workspace
78
- - run :
79
- command : yarn test:ci
80
- - store_test_results :
81
- path : reports/junit
82
- - codecov/upload :
83
- file : coverage/*.json
84
- flags : unittests
78
+ - *attach-workspace
79
+ - run :
80
+ command : yarn test:ci
81
+ - store_test_results :
82
+ path : reports/junit
83
+ - codecov/upload :
84
+ file : coverage/*.json
85
+ flags : unittests
86
+
87
+ check-dependencies :
88
+ << : *job-defaults
89
+ steps :
90
+ - *attach-workspace
91
+ - run :
92
+ command : ls -la
93
+ - run :
94
+ command : yarn check-dependencies
85
95
86
96
doc :
87
97
<< : *job-defaults
88
98
steps :
89
- - *attach-workspace
90
- - run :
91
- command : yarn doc
92
- - store_artifacts :
93
- path : docs
99
+ - *attach-workspace
100
+ - run :
101
+ command : yarn doc
102
+ - store_artifacts :
103
+ path : docs
94
104
95
105
build :
96
106
<< : *job-defaults
97
107
steps :
98
- - *attach-workspace
99
- - run :
100
- command : yarn build
108
+ - *attach-workspace
109
+ - run :
110
+ command : yarn build
111
+ - persist_to_workspace :
112
+ root : ~/
113
+ paths :
114
+ - ./semaphore/dist
115
+
116
+ release :
117
+ << : *job-defaults
118
+ steps :
119
+ - *attach-workspace
120
+ - run :
121
+ command : yarn semantic-release
101
122
102
123
workflows :
103
124
version : 2
104
125
default_workflow :
105
126
jobs :
106
- - setup
107
- - lint :
108
- requires :
109
- - setup
110
- - test :
111
- requires :
112
- - setup
113
- - doc :
114
- requires :
115
- - setup
116
- - build :
117
- requires :
118
127
- setup
128
+ - lint :
129
+ requires :
130
+ - setup
131
+ - test :
132
+ requires :
133
+ - setup
134
+ - doc :
135
+ requires :
136
+ - setup
137
+ - build :
138
+ requires :
139
+ - setup
140
+ - check-dependencies :
141
+ requires :
142
+ - build
143
+ - release :
144
+ filters :
145
+ *release_branches_filter
146
+ requires :
147
+ - lint
148
+ - test
149
+ - doc
150
+ - build
151
+ - check-dependencies
0 commit comments