Browse Source

chore: update circleci

pull/11421/head
Wei Zhu 6 years ago
parent
commit
0f503b50f7
  1. 132
      .circleci/config.yml

132
.circleci/config.yml

@ -22,121 +22,195 @@ references:
key: npm-cache key: npm-cache
install_react: &install_react install_react: &install_react
run: ./scripts/install-react.sh run: REACT=15 ./scripts/install-react.sh
react_15: &react_15
environment:
REACT: 15
react_16: &react_16
environment:
REACT: 16
jobs: jobs:
setup: setup:
<<: *container_config <<: *container_config
steps: steps:
- checkout
- *restore_cache - *restore_cache
- run: npm install
- run: node -v - run: node -v
- run: npm -v - run: npm -v
- run: npm install
- run:
command: |
set +eo
npm ls
true
- *save_cache - *save_cache
- persist_to_workspace: - persist_to_workspace:
root: ~/ant-design root: ~/ant-design
paths: paths:
- ./* - 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
lint: lint:
<<: *container_config <<: *container_config
steps: steps:
- checkout
- *attach_workspace - *attach_workspace
- run: npm run lint - run: npm run lint
test_dist: test_dist:
<<: *container_config <<: *container_config
<<: *react_16
steps: steps:
- checkout
- *attach_workspace - *attach_workspace
- run: npm run dist - run:
- run: node ./tests/dekko/dist.test.js command: npm test -- -w 2
- run: REACT=16 LIB_DIR=dist npm test environment:
LIB_DIR: dist
test_lib: test_lib:
<<: *container_config <<: *container_config
<<: *react_16
steps: steps:
- checkout
- *attach_workspace - *attach_workspace
- run: npm run compile - run:
- run: node ./tests/dekko/lib.test.js command: npm test -- -w 2
- run: REACT=16 LIB_DIR=lib npm test environment:
LIB_DIR: lib
test_es: test_es:
<<: *container_config <<: *container_config
<<: *react_16
steps: steps:
- checkout
- *attach_workspace - *attach_workspace
- run: npm run compile - run:
- run: REACT=16 LIB_DIR=es npm test command: npm test -- -w 2
environment:
LIB_DIR: es
test_dom: test_dom:
<<: *container_config <<: *container_config
<<: *react_16
steps: steps:
- checkout
- *attach_workspace - *attach_workspace
- run: REACT=16 npm test -- --coverage - run: npm test -- -w 2 --coverage
- run: bash <(curl -s https://codecov.io/bash) - run: bash <(curl -s https://codecov.io/bash)
test_node: test_node:
<<: *container_config <<: *container_config
<<: *react_16
steps: steps:
- checkout
- *attach_workspace - *attach_workspace
- run: REACT=16 npm run test-node - run: npm run test-node -- -w 2
test_dist_15: test_dist_15:
<<: *container_config <<: *container_config
<<: *react_15
steps: steps:
- checkout
- *attach_workspace - *attach_workspace
- *install_react - *install_react
- run: node ./tests/dekko/dist.test.js - run:
- run: REACT=15 LIB_DIR=dist npm test -u command: npm test -- -w 2 -u
environment:
LIB_DIR: dist
test_lib_15: test_lib_15:
<<: *container_config <<: *container_config
<<: *react_15
steps: steps:
- checkout
- *attach_workspace - *attach_workspace
- *install_react - *install_react
- run: npm run compile - run:
- run: node ./tests/dekko/lib.test.js command: npm test -- -w 2 -u
- run: REACT=15 LIB_DIR=lib npm test environment:
LIB_DIR: lib
test_es_15: test_es_15:
<<: *container_config <<: *container_config
<<: *react_15
steps: steps:
- checkout
- *attach_workspace - *attach_workspace
- *install_react - *install_react
- run: npm run compile - run:
- run: REACT=15 LIB_DIR=es npm test command: npm test -- -w 2 -u
environment:
LIB_DIR: es
test_dom_15: test_dom_15:
<<: *container_config <<: *container_config
<<: *react_15
steps: steps:
- checkout
- *attach_workspace - *attach_workspace
- *install_react - *install_react
- run: REACT=15 npm test -- --coverage - run: npm test -- -w 2 -u
- run: bash <(curl -s https://codecov.io/bash)
test_node_15: test_node_15:
<<: *container_config <<: *container_config
<<: *react_15
steps: steps:
- checkout
- *attach_workspace - *attach_workspace
- *install_react - *install_react
- run: REACT=15 npm run test-node - run: npm run test-node -- -w 2 -u
workflows: workflows:
version: 2 version: 2
build-test: build-test:
jobs: jobs:
- setup - setup
- dist:
requires:
- setup
- compile:
requires:
- setup
- lint: - lint:
requires: requires:
- setup - setup
- test_dist: - test_dist:
requires: requires:
- setup - dist
- test_lib: - test_lib:
requires: requires:
- setup - compile
- test_es: - test_es:
requires: requires:
- setup - compile
- test_dom: - test_dom:
requires: requires:
- setup - setup
@ -145,13 +219,13 @@ workflows:
- setup - setup
- test_dist_15: - test_dist_15:
requires: requires:
- setup - dist
- test_lib_15: - test_lib_15:
requires: requires:
- setup - compile
- test_es_15: - test_es_15:
requires: requires:
- setup - compile
- test_dom_15: - test_dom_15:
requires: requires:
- setup - setup

Loading…
Cancel
Save