Browse Source

chore: tweak circleci

pull/11421/head
Wei Zhu 6 years ago
parent
commit
522b70e698
  1. 205
      .circleci/config.yml

205
.circleci/config.yml

@ -1,168 +1,175 @@
version: 2 version: 2
jobs: references:
setup: container_config: &container_config
docker: docker:
- image: circleci/node:8 - image: circleci/node:8
working_directory: ~/ant-design working_directory: ~/ant-design
steps:
- checkout
# Download and cache dependencies restore_cache: &restore_cache
- restore_cache: restore_cache:
keys: keys:
- npm-cache - npm-cache
# fallback to using the latest cache if no exact match is found
- run: npm install
- run: node -v
- run: npm -v
- save_cache: save_cache: &save_cache
paths: save_cache:
- ~/.npm paths:
key: npm-cache - ~/.npm
key: npm-cache
install-react: install_react: &install_react
docker: run: ./scripts/install-react.sh
- image: circleci/node:8
working_directory: ~/ant-design
steps:
- run: ./scripts/install-react.sh
jobs:
lint: lint:
docker: <<: *container_config
- image: circleci/node:8
working_directory: ~/ant-design
docker:
- image: circleci/node:8
steps: steps:
# run tests! - checkout
- *restore_cache
- run: npm install
- run: node -v
- run: npm -v
- *save_cache
- run: npm run lint - run: npm run lint
test-dist: test_dist:
docker: <<: *container_config
- image: circleci/node:8
working_directory: ~/ant-design
steps: steps:
- checkout
- *restore_cache
- run: npm install
- run: node -v
- run: npm -v
- *save_cache
- run: npm run dist - run: npm run dist
- run: node ./tests/dekko/dist.test.js - run: node ./tests/dekko/dist.test.js
- run: REACT=16 LIB_DIR=dist npm test - run: REACT=16 LIB_DIR=dist npm test
test-lib: test_lib:
docker: <<: *container_config
- image: circleci/node:8
working_directory: ~/ant-design
steps: steps:
- checkout
- *restore_cache
- run: npm install
- run: node -v
- run: npm -v
- *save_cache
- run: npm run compile - run: npm run compile
- run: node ./tests/dekko/lib.test.js - run: node ./tests/dekko/lib.test.js
- run: REACT=16 LIB_DIR=lib npm test - run: REACT=16 LIB_DIR=lib npm test
test-es: test_es:
docker: <<: *container_config
- image: circleci/node:8
working_directory: ~/ant-design
steps: steps:
- checkout
- *restore_cache
- run: npm install
- run: node -v
- run: npm -v
- *save_cache
- run: npm run compile - run: npm run compile
- run: REACT=16 LIB_DIR=es npm test - run: REACT=16 LIB_DIR=es npm test
test-dom: test_dom:
docker: <<: *container_config
- image: circleci/node:8
working_directory: ~/ant-design
steps: steps:
- checkout
- *restore_cache
- run: npm install
- run: node -v
- run: npm -v
- *save_cache
- run: REACT=16 npm test -- --coverage - run: REACT=16 npm test -- --coverage
- run: bash <(curl -s https://codecov.io/bash) - run: bash <(curl -s https://codecov.io/bash)
test-node: test_node:
docker: <<: *container_config
- image: circleci/node:8
working_directory: ~/ant-design
steps: steps:
- checkout
- *restore_cache
- run: npm install
- run: node -v
- run: npm -v
- *save_cache
- run: REACT=16 npm run test-node - run: REACT=16 npm run test-node
test-dist-15: test_dist_15:
docker: <<: *container_config
- image: circleci/node:8
working_directory: ~/ant-design
steps: steps:
- run: npm run dist - checkout
- *restore_cache
- run: npm install
- run: node -v
- run: npm -v
- *save_cache
- *install_react
- run: node ./tests/dekko/dist.test.js - run: node ./tests/dekko/dist.test.js
- run: REACT=15 LIB_DIR=dist npm test -u - run: REACT=15 LIB_DIR=dist npm test -u
test-lib-15: test_lib_15:
docker: <<: *container_config
- image: circleci/node:8
working_directory: ~/ant-design
steps: steps:
- checkout
- *restore_cache
- run: npm install
- run: node -v
- run: npm -v
- *save_cache
- *install_react
- run: npm run compile - run: npm run compile
- run: node ./tests/dekko/lib.test.js - run: node ./tests/dekko/lib.test.js
- run: REACT=15 LIB_DIR=lib npm test - run: REACT=15 LIB_DIR=lib npm test
test-es-15: test_es_15:
docker: <<: *container_config
- image: circleci/node:8
working_directory: ~/ant-design
steps: steps:
- checkout
- *restore_cache
- run: npm install
- run: node -v
- run: npm -v
- *save_cache
- *install_react
- run: npm run compile - run: npm run compile
- run: REACT=15 LIB_DIR=es npm test - run: REACT=15 LIB_DIR=es npm test
test-dom-15: test_dom_15:
docker: <<: *container_config
- image: circleci/node:8
working_directory: ~/ant-design
steps: steps:
- checkout
- *restore_cache
- run: npm install
- run: node -v
- run: npm -v
- *save_cache
- *install_react
- run: REACT=15 npm test -- --coverage - run: REACT=15 npm test -- --coverage
- run: bash <(curl -s https://codecov.io/bash) - run: bash <(curl -s https://codecov.io/bash)
test-node-15: test_node_15:
docker: <<: *container_config
- image: circleci/node:8
working_directory: ~/ant-design
steps: steps:
- checkout
- *restore_cache
- run: npm install
- run: node -v
- run: npm -v
- *save_cache
- *install_react
- run: REACT=15 npm run test-node - run: REACT=15 npm run test-node
workflows: workflows:
version: 2 version: 2
build-test: build-test:
jobs: jobs:
- setup
- install-react
- lint: - lint:
requires:
- setup
- test-dist: - test-dist:
requires:
- setup
- test-lib: - test-lib:
requires:
- setup
- test-es: - test-es:
requires:
- setup
- test-dom: - test-dom:
requires:
- setup
- test-node: - test-node:
requires:
- setup
- test-dist-15: - test-dist-15:
requires:
- setup
- install-react
- test-lib-15: - test-lib-15:
requires:
- setup
- install-react
- test-es-15: - test-es-15:
requires:
- setup
- install-react
- test-dom-15: - test-dom-15:
requires:
- setup
- install-react
- test-node-15: - test-node-15:
requires:
- setup
- install-react

Loading…
Cancel
Save