ant-design/.circleci/config.yml

159 lines
3.2 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: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
restore_cache: &restore_cache
restore_cache:
keys:
- npm-cache
2018-07-23 17:27:43 +08:00
2018-07-23 17:49:54 +08:00
save_cache: &save_cache
save_cache:
paths:
- ~/.npm
key: npm-cache
2018-07-23 17:27:43 +08:00
2018-07-23 17:49:54 +08:00
install_react: &install_react
run: ./scripts/install-react.sh
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 17:49:54 +08:00
- *restore_cache
- run: npm install
- run: node -v
- run: npm -v
- *save_cache
2018-07-23 18:20:55 +08:00
- persist_to_workspace:
root: ~/ant-design
lint:
<<: *container_config
steps:
- *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 17:27:43 +08:00
steps:
2018-07-23 18:20:55 +08:00
- *attach_workspace
2018-07-23 17:27:43 +08:00
- run: npm run dist
- run: node ./tests/dekko/dist.test.js
- run: REACT=16 LIB_DIR=dist npm test
2018-07-23 17:49:54 +08:00
test_lib:
<<: *container_config
2018-07-23 17:27:43 +08:00
steps:
2018-07-23 18:20:55 +08:00
- *attach_workspace
2018-07-23 17:27:43 +08:00
- run: npm run compile
- run: node ./tests/dekko/lib.test.js
- run: REACT=16 LIB_DIR=lib npm test
2018-07-23 17:49:54 +08:00
test_es:
<<: *container_config
2018-07-23 17:27:43 +08:00
steps:
2018-07-23 18:20:55 +08:00
- *attach_workspace
2018-07-23 17:27:43 +08:00
- run: npm run compile
- run: REACT=16 LIB_DIR=es npm test
2018-07-23 17:49:54 +08:00
test_dom:
<<: *container_config
2018-07-23 17:27:43 +08:00
steps:
2018-07-23 18:20:55 +08:00
- *attach_workspace
2018-07-23 17:27:43 +08:00
- run: REACT=16 npm test -- --coverage
- run: bash <(curl -s https://codecov.io/bash)
2018-07-23 17:49:54 +08:00
test_node:
<<: *container_config
2018-07-23 17:27:43 +08:00
steps:
2018-07-23 18:20:55 +08:00
- *attach_workspace
2018-07-23 17:27:43 +08:00
- run: REACT=16 npm run test-node
2018-07-23 17:49:54 +08:00
test_dist_15:
<<: *container_config
2018-07-23 17:27:43 +08:00
steps:
2018-07-23 18:20:55 +08:00
- *attach_workspace
2018-07-23 17:49:54 +08:00
- *install_react
2018-07-23 17:27:43 +08:00
- run: node ./tests/dekko/dist.test.js
- run: REACT=15 LIB_DIR=dist npm test -u
2018-07-23 17:49:54 +08:00
test_lib_15:
<<: *container_config
2018-07-23 17:27:43 +08:00
steps:
2018-07-23 18:20:55 +08:00
- *attach_workspace
2018-07-23 17:49:54 +08:00
- *install_react
2018-07-23 17:27:43 +08:00
- run: npm run compile
- run: node ./tests/dekko/lib.test.js
- run: REACT=15 LIB_DIR=lib npm test
2018-07-23 17:49:54 +08:00
test_es_15:
<<: *container_config
2018-07-23 17:27:43 +08:00
steps:
2018-07-23 18:20:55 +08:00
- *attach_workspace
2018-07-23 17:49:54 +08:00
- *install_react
2018-07-23 17:27:43 +08:00
- run: npm run compile
- run: REACT=15 LIB_DIR=es npm test
2018-07-23 17:49:54 +08:00
test_dom_15:
<<: *container_config
2018-07-23 17:27:43 +08:00
steps:
2018-07-23 18:20:55 +08:00
- *attach_workspace
2018-07-23 17:49:54 +08:00
- *install_react
2018-07-23 17:27:43 +08:00
- run: REACT=15 npm test -- --coverage
- run: bash <(curl -s https://codecov.io/bash)
2018-07-23 17:49:54 +08:00
test_node_15:
<<: *container_config
2018-07-23 17:27:43 +08:00
steps:
2018-07-23 18:20:55 +08:00
- *attach_workspace
2018-07-23 17:49:54 +08:00
- *install_react
2018-07-23 17:27:43 +08:00
- run: REACT=15 npm run test-node
workflows:
version: 2
build-test:
jobs:
2018-07-23 18:20:55 +08:00
- setup
2018-07-23 17:27:43 +08:00
- lint:
2018-07-23 18:20:55 +08:00
requires:
- setup
2018-07-23 17:27:43 +08:00
- test-dist:
2018-07-23 18:20:55 +08:00
requires:
- setup
2018-07-23 17:27:43 +08:00
- test-lib:
2018-07-23 18:20:55 +08:00
requires:
- setup
2018-07-23 17:27:43 +08:00
- test-es:
2018-07-23 18:20:55 +08:00
requires:
- setup
2018-07-23 17:27:43 +08:00
- test-dom:
2018-07-23 18:20:55 +08:00
requires:
- setup
2018-07-23 17:27:43 +08:00
- test-node:
2018-07-23 18:20:55 +08:00
requires:
- setup
2018-07-23 17:27:43 +08:00
- test-dist-15:
2018-07-23 18:20:55 +08:00
requires:
- setup
2018-07-23 17:27:43 +08:00
- test-lib-15:
2018-07-23 18:20:55 +08:00
requires:
- setup
2018-07-23 17:27:43 +08:00
- test-es-15:
2018-07-23 18:20:55 +08:00
requires:
- setup
2018-07-23 17:27:43 +08:00
- test-dom-15:
2018-07-23 18:20:55 +08:00
requires:
- setup
2018-07-23 17:27:43 +08:00
- test-node-15:
2018-07-23 18:20:55 +08:00
requires:
- setup