forked from DTStack/dt-react-codemirror-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
56 lines (48 loc) · 1.03 KB
/
.gitlab-ci.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
# Read more: https://docs.gitlab.com/12.7/ee/ci/yaml/README.html
cache:
paths:
- node_modules/
# 当 merge_requests, master, dev, test 分支时会执行依赖安装
before_script:
- "npm install --unsafe-perm=true --allow-root"
stages:
- lint
- lintdoc
- check-types
- test
- build_deploy
# 当 merge_requests 执行 eslint 检查
code_quality:
stage: lint
script:
- npm run lint
only:
- merge_requests
# 当 merge_requests 执行 tsc 类型检查
check_types:
stage: check-types
script:
- npm run check-types
only:
- merge_requests
# 当 merge_requests 有更时会执行单元测试任务
test:
stage: test
script:
- npm run test
only:
- merge_requests
#执行 MD 文档校验, 为 doc 或者 master 命名当分支更新时才会触发
doc_quality:
stage: lintdoc
script:
- npm run lint-doc
only:
- /doc(s)|release/
- master
build_deploy: # Deploy master to Github Page
stage: build_deploy
script:
- npm run deploy-storybook
only:
- /master/