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:8
|
|
|
|
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
|
|
|
|
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
|
|
|
|
|
|
|
|
dist:
|
|
|
|
<<: *container_config
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- *attach_workspace
|
|
|
|
- run: npm run dist
|
|
|
|
- run: node ./tests/dekko/dist.test.js
|
|
|
|
- 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:
|
|
|
|
command: npm test -- -w 2
|
|
|
|
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:
|
|
|
|
command: npm test -- -w 2
|
|
|
|
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:
|
|
|
|
command: npm test -- -w 2
|
|
|
|
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-07-23 18:29:23 +08:00
|
|
|
- run: npm test -- -w 2 --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-07-23 18:29:23 +08:00
|
|
|
- run: npm run test-node -- -w 2
|
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:
|
|
|
|
command: npm test -- -w 2 -u
|
|
|
|
environment:
|
|
|
|
LIB_DIR: dist
|
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:
|
|
|
|
command: npm test -- -w 2 -u
|
|
|
|
environment:
|
|
|
|
LIB_DIR: lib
|
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:
|
|
|
|
command: npm test -- -w 2 -u
|
|
|
|
environment:
|
|
|
|
LIB_DIR: es
|
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
|
2018-07-23 18:29:23 +08:00
|
|
|
- run: npm test -- -w 2 -u
|
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
|
2018-07-23 18:29:23 +08:00
|
|
|
- run: npm run test-node -- -w 2 -u
|
2018-07-23 17:27:43 +08:00
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
build-test:
|
|
|
|
jobs:
|
2018-07-23 18:20:55 +08:00
|
|
|
- setup
|
2018-07-23 18:29:23 +08:00
|
|
|
- dist:
|
|
|
|
requires:
|
|
|
|
- setup
|
|
|
|
- compile:
|
|
|
|
requires:
|
|
|
|
- setup
|
2018-07-23 17:27:43 +08:00
|
|
|
- lint:
|
2018-07-23 18:20:55 +08:00
|
|
|
requires:
|
|
|
|
- setup
|
2018-07-23 18:25:18 +08:00
|
|
|
- test_dist:
|
2018-07-23 18:20:55 +08:00
|
|
|
requires:
|
2018-07-23 18:29:23 +08:00
|
|
|
- dist
|
2018-07-23 18:25:18 +08:00
|
|
|
- test_lib:
|
2018-07-23 18:20:55 +08:00
|
|
|
requires:
|
2018-07-23 18:29:23 +08:00
|
|
|
- compile
|
2018-07-23 18:25:18 +08:00
|
|
|
- test_es:
|
2018-07-23 18:20:55 +08:00
|
|
|
requires:
|
2018-07-23 18:29:23 +08:00
|
|
|
- compile
|
2018-07-23 18:25:18 +08:00
|
|
|
- test_dom:
|
2018-07-23 18:20:55 +08:00
|
|
|
requires:
|
|
|
|
- setup
|
2018-07-23 18:25:18 +08:00
|
|
|
- test_node:
|
2018-07-23 18:20:55 +08:00
|
|
|
requires:
|
|
|
|
- setup
|
2018-07-23 18:25:18 +08:00
|
|
|
- test_dist_15:
|
2018-07-23 18:20:55 +08:00
|
|
|
requires:
|
2018-07-23 18:29:23 +08:00
|
|
|
- dist
|
2018-07-23 18:25:18 +08:00
|
|
|
- test_lib_15:
|
2018-07-23 18:20:55 +08:00
|
|
|
requires:
|
2018-07-23 18:29:23 +08:00
|
|
|
- compile
|
2018-07-23 18:25:18 +08:00
|
|
|
- test_es_15:
|
2018-07-23 18:20:55 +08:00
|
|
|
requires:
|
2018-07-23 18:29:23 +08:00
|
|
|
- compile
|
2018-07-23 18:25:18 +08:00
|
|
|
- test_dom_15:
|
2018-07-23 18:20:55 +08:00
|
|
|
requires:
|
|
|
|
- setup
|
2018-07-23 18:25:18 +08:00
|
|
|
- test_node_15:
|
2018-07-23 18:20:55 +08:00
|
|
|
requires:
|
|
|
|
- setup
|