version: 2 references: container_config: &container_config docker: - image: circleci/node:8 working_directory: ~/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: lint: <<: *container_config steps: - checkout - *restore_cache - run: npm install - run: node -v - run: npm -v - *save_cache - run: npm run lint test_dist: <<: *container_config steps: - checkout - *restore_cache - run: npm install - run: node -v - run: npm -v - *save_cache - run: npm run dist - run: node ./tests/dekko/dist.test.js - run: REACT=16 LIB_DIR=dist npm test test_lib: <<: *container_config steps: - checkout - *restore_cache - run: npm install - run: node -v - run: npm -v - *save_cache - run: npm run compile - run: node ./tests/dekko/lib.test.js - run: REACT=16 LIB_DIR=lib npm test test_es: <<: *container_config steps: - checkout - *restore_cache - run: npm install - run: node -v - run: npm -v - *save_cache - run: npm run compile - run: REACT=16 LIB_DIR=es npm test test_dom: <<: *container_config steps: - checkout - *restore_cache - run: npm install - run: node -v - run: npm -v - *save_cache - run: REACT=16 npm test -- --coverage - run: bash <(curl -s https://codecov.io/bash) test_node: <<: *container_config steps: - checkout - *restore_cache - run: npm install - run: node -v - run: npm -v - *save_cache - run: REACT=16 npm run test-node test_dist_15: <<: *container_config steps: - checkout - *restore_cache - run: npm install - run: node -v - run: npm -v - *save_cache - *install_react - run: node ./tests/dekko/dist.test.js - run: REACT=15 LIB_DIR=dist npm test -u test_lib_15: <<: *container_config steps: - checkout - *restore_cache - run: npm install - run: node -v - run: npm -v - *save_cache - *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: - checkout - *restore_cache - run: npm install - run: node -v - run: npm -v - *save_cache - *install_react - run: npm run compile - run: REACT=15 LIB_DIR=es npm test test_dom_15: <<: *container_config steps: - checkout - *restore_cache - run: npm install - run: node -v - run: npm -v - *save_cache - *install_react - run: REACT=15 npm test -- --coverage - run: bash <(curl -s https://codecov.io/bash) test_node_15: <<: *container_config steps: - checkout - *restore_cache - run: npm install - run: node -v - run: npm -v - *save_cache - *install_react - run: REACT=15 npm run test-node workflows: version: 2 build-test: jobs: - lint: - test-dist: - test-lib: - test-es: - test-dom: - test-node: - test-dist-15: - test-lib-15: - test-es-15: - test-dom-15: - test-node-15: