ant-design/.circleci/config.yml

259 lines
4.9 KiB
YAML
Raw Normal View History

2018-07-23 17:27:43 +08:00
version: 2
2018-07-23 17:49:54 +08:00
references:
container_config: &container_config
2018-07-23 17:27:43 +08:00
docker:
- image: circleci/node:lts
2018-07-23 17:27:43 +08:00
working_directory: ~/ant-design
2018-07-23 18:20:55 +08:00
attach_workspace: &attach_workspace
attach_workspace:
at: ~/ant-design
2018-07-23 17:49:54 +08:00
install_react: &install_react
2018-07-23 18:29:23 +08:00
run: REACT=15 ./scripts/install-react.sh
react_15: &react_15
environment:
REACT: 15
react_16: &react_16
environment:
REACT: 16
2018-07-23 17:27:43 +08:00
workflow: &workflow
jobs:
- setup:
filters:
branches:
ignore: gh-pages
- dist:
requires:
- setup
- compile:
requires:
- setup
- lint:
requires:
- setup
- test_dist:
requires:
- dist
- test_lib:
requires:
- compile
- test_es:
requires:
- compile
- test_dom:
requires:
- setup
- test_node:
requires:
- setup
- test_dist_15:
requires:
- dist
- test_lib_15:
requires:
- compile
- test_es_15:
requires:
- compile
- test_dom_15:
requires:
- setup
- test_node_15:
requires:
- setup
- check_metadata:
requires:
- setup
2018-07-23 17:49:54 +08:00
jobs:
2018-07-23 18:20:55 +08:00
setup:
2018-07-23 17:49:54 +08:00
<<: *container_config
2018-07-23 17:27:43 +08:00
steps:
2018-07-23 18:29:23 +08:00
- checkout
2018-07-23 17:49:54 +08:00
- run: node -v
- run: npm -v
2018-07-23 18:29:23 +08:00
- run: npm install
- run:
command: |
set +eo
npm ls
true
2018-07-23 18:20:55 +08:00
- persist_to_workspace:
root: ~/ant-design
2018-07-23 18:23:55 +08:00
paths:
2018-07-23 18:29:23 +08:00
- node_modules
- store_artifacts:
path: package-lock.json
2018-07-23 18:29:23 +08:00
dist:
<<: *container_config
steps:
- checkout
- *attach_workspace
- run: npm run dist
- run: node ./tests/dekko/dist.test.js
2019-08-28 14:14:00 +08:00
- run: npm run bundlesize
2018-07-23 18:29:23 +08:00
- persist_to_workspace:
root: ~/ant-design
paths:
- dist
compile:
<<: *container_config
steps:
- checkout
- *attach_workspace
- run: npm run compile
- run: node ./tests/dekko/lib.test.js
- persist_to_workspace:
root: ~/ant-design
paths:
- lib
- es
2018-07-23 18:20:55 +08:00
lint:
<<: *container_config
steps:
2018-07-23 18:29:23 +08:00
- checkout
2018-07-23 18:20:55 +08:00
- *attach_workspace
2018-07-23 17:27:43 +08:00
- run: npm run lint
2018-07-23 17:49:54 +08:00
test_dist:
<<: *container_config
2018-07-23 18:29:23 +08:00
<<: *react_16
2018-07-23 17:27:43 +08:00
steps:
2018-07-23 18:29:23 +08:00
- checkout
2018-07-23 18:20:55 +08:00
- *attach_workspace
2018-07-23 18:29:23 +08:00
- run:
2018-08-01 10:53:06 +08:00
command: npm test -- -w 1
2018-07-23 18:29:23 +08:00
environment:
LIB_DIR: dist
2018-07-23 17:27:43 +08:00
2018-07-23 17:49:54 +08:00
test_lib:
<<: *container_config
2018-07-23 18:29:23 +08:00
<<: *react_16
2018-07-23 17:27:43 +08:00
steps:
2018-07-23 18:29:23 +08:00
- checkout
2018-07-23 18:20:55 +08:00
- *attach_workspace
2018-07-23 18:29:23 +08:00
- run:
2018-08-01 10:53:06 +08:00
command: npm test -- -w 1
2018-07-23 18:29:23 +08:00
environment:
LIB_DIR: lib
2018-07-23 17:27:43 +08:00
2018-07-23 17:49:54 +08:00
test_es:
<<: *container_config
2018-07-23 18:29:23 +08:00
<<: *react_16
2018-07-23 17:27:43 +08:00
steps:
2018-07-23 18:29:23 +08:00
- checkout
2018-07-23 18:20:55 +08:00
- *attach_workspace
2018-07-23 18:29:23 +08:00
- run:
2018-08-01 10:53:06 +08:00
command: npm test -- -w 1
2018-07-23 18:29:23 +08:00
environment:
LIB_DIR: es
2018-07-23 17:27:43 +08:00
2018-07-23 17:49:54 +08:00
test_dom:
<<: *container_config
2018-07-23 18:29:23 +08:00
<<: *react_16
2018-07-23 17:27:43 +08:00
steps:
2018-07-23 18:29:23 +08:00
- checkout
2018-07-23 18:20:55 +08:00
- *attach_workspace
2018-08-01 10:53:06 +08:00
- run: npm test -- -w 1 --coverage
2018-07-23 17:27:43 +08:00
- run: bash <(curl -s https://codecov.io/bash)
2018-07-23 17:49:54 +08:00
test_node:
<<: *container_config
2018-07-23 18:29:23 +08:00
<<: *react_16
2018-07-23 17:27:43 +08:00
steps:
2018-07-23 18:29:23 +08:00
- checkout
2018-07-23 18:20:55 +08:00
- *attach_workspace
2018-08-01 10:53:06 +08:00
- run: npm run test-node -- -w 1
2018-07-23 17:27:43 +08:00
2018-07-23 17:49:54 +08:00
test_dist_15:
<<: *container_config
2018-07-23 18:29:23 +08:00
<<: *react_15
2018-07-23 17:27:43 +08:00
steps:
2018-07-23 18:29:23 +08:00
- checkout
2018-07-23 18:20:55 +08:00
- *attach_workspace
2018-07-23 17:49:54 +08:00
- *install_react
2018-07-23 18:29:23 +08:00
- run:
2018-08-01 10:53:06 +08:00
command: npm test -- -w 1 -u
2018-07-23 18:29:23 +08:00
environment:
LIB_DIR: dist
REACT: 15
2018-07-23 17:27:43 +08:00
2018-07-23 17:49:54 +08:00
test_lib_15:
<<: *container_config
2018-07-23 18:29:23 +08:00
<<: *react_15
2018-07-23 17:27:43 +08:00
steps:
2018-07-23 18:29:23 +08:00
- checkout
2018-07-23 18:20:55 +08:00
- *attach_workspace
2018-07-23 17:49:54 +08:00
- *install_react
2018-07-23 18:29:23 +08:00
- run:
2018-08-01 10:53:06 +08:00
command: npm test -- -w 1 -u
2018-07-23 18:29:23 +08:00
environment:
LIB_DIR: lib
REACT: 15
2018-07-23 17:27:43 +08:00
2018-07-23 17:49:54 +08:00
test_es_15:
<<: *container_config
2018-07-23 18:29:23 +08:00
<<: *react_15
2018-07-23 17:27:43 +08:00
steps:
2018-07-23 18:29:23 +08:00
- checkout
2018-07-23 18:20:55 +08:00
- *attach_workspace
2018-07-23 17:49:54 +08:00
- *install_react
2018-07-23 18:29:23 +08:00
- run:
2018-08-01 10:53:06 +08:00
command: npm test -- -w 1 -u
2018-07-23 18:29:23 +08:00
environment:
LIB_DIR: es
REACT: 15
2018-07-23 17:27:43 +08:00
2018-07-23 17:49:54 +08:00
test_dom_15:
<<: *container_config
2018-07-23 18:29:23 +08:00
<<: *react_15
2018-07-23 17:27:43 +08:00
steps:
2018-07-23 18:29:23 +08:00
- checkout
2018-07-23 18:20:55 +08:00
- *attach_workspace
2018-07-23 17:49:54 +08:00
- *install_react
- run:
command: npm test -- -w 1 -u
environment:
REACT: 15
2018-07-23 17:27:43 +08:00
2018-07-23 17:49:54 +08:00
test_node_15:
<<: *container_config
2018-07-23 18:29:23 +08:00
<<: *react_15
2018-07-23 17:27:43 +08:00
steps:
2018-07-23 18:29:23 +08:00
- checkout
2018-07-23 18:20:55 +08:00
- *attach_workspace
2018-07-23 17:49:54 +08:00
- *install_react
- run:
command: npm run test-node -- -w 1 -u
environment:
REACT: 15
2018-07-23 17:27:43 +08:00
check_metadata:
<<: *container_config
steps:
- checkout
- *attach_workspace
- run: node ./scripts/check-demo.js
2018-07-23 17:27:43 +08:00
workflows:
version: 2
build_test:
<<: *workflow
nightly:
<<: *workflow
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- master