You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

161 lines
3.2 KiB

version: 2
references:
container_config: &container_config
docker:
- image: circleci/node:8
working_directory: ~/ant-design
attach_workspace: &attach_workspace
attach_workspace:
at: ~/ant-design
restore_cache: &restore_cache
restore_cache:
keys:
- npm-cache
save_cache: &save_cache
save_cache:
paths:
- ~/.npm
key: npm-cache
install_react: &install_react
run: ./scripts/install-react.sh
jobs:
setup:
<<: *container_config
steps:
- *restore_cache
- run: npm install
- run: node -v
- run: npm -v
- *save_cache
- persist_to_workspace:
root: ~/ant-design
paths:
- ./*
lint:
<<: *container_config
steps:
- *attach_workspace
- run: npm run lint
test_dist:
<<: *container_config
steps:
- *attach_workspace
- run: npm run dist
- run: node ./tests/dekko/dist.test.js
- run: REACT=16 LIB_DIR=dist npm test
test_lib:
<<: *container_config
steps:
- *attach_workspace
- run: npm run compile
- run: node ./tests/dekko/lib.test.js
- run: REACT=16 LIB_DIR=lib npm test
test_es:
<<: *container_config
steps:
- *attach_workspace
- run: npm run compile
- run: REACT=16 LIB_DIR=es npm test
test_dom:
<<: *container_config
steps:
- *attach_workspace
- run: REACT=16 npm test -- --coverage
- run: bash <(curl -s https://codecov.io/bash)
test_node:
<<: *container_config
steps:
- *attach_workspace
- run: REACT=16 npm run test-node
test_dist_15:
<<: *container_config
steps:
- *attach_workspace
- *install_react
- run: node ./tests/dekko/dist.test.js
- run: REACT=15 LIB_DIR=dist npm test -u
test_lib_15:
<<: *container_config
steps:
- *attach_workspace
- *install_react
- run: npm run compile
- run: node ./tests/dekko/lib.test.js
- run: REACT=15 LIB_DIR=lib npm test
test_es_15:
<<: *container_config
steps:
- *attach_workspace
- *install_react
- run: npm run compile
- run: REACT=15 LIB_DIR=es npm test
test_dom_15:
<<: *container_config
steps:
- *attach_workspace
- *install_react
- run: REACT=15 npm test -- --coverage
- run: bash <(curl -s https://codecov.io/bash)
test_node_15:
<<: *container_config
steps:
- *attach_workspace
- *install_react
- run: REACT=15 npm run test-node
workflows:
version: 2
build-test:
jobs:
- setup
- lint:
requires:
- setup
- test_dist:
requires:
- setup
- test_lib:
requires:
- setup
- test_es:
requires:
- setup
- test_dom:
requires:
- setup
- test_node:
requires:
- setup
- test_dist_15:
requires:
- setup
- test_lib_15:
requires:
- setup
- test_es_15:
requires:
- setup
- test_dom_15:
requires:
- setup
- test_node_15:
requires:
- setup