config.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. version: 2
  2. aliases:
  3. - &restore-node-modules-cache
  4. keys:
  5. - v1-yarn-deps-{{ checksum "yarn.lock" }}
  6. - &restore-yarn-cache
  7. keys:
  8. - v1-yarn-cache
  9. - &save-node-modules-cache
  10. paths:
  11. - node_modules
  12. key: v1-yarn-deps-{{ checksum "yarn.lock" }}
  13. - &save-yarn-cache
  14. paths:
  15. - ~/.yarn-cache
  16. key: v1-yarn-cache
  17. - &artifact_babel
  18. path: ~/babel/packages/babel-standalone/babel.js
  19. - &artifact_babel_min
  20. path: ~/babel/packages/babel-standalone/babel.min.js
  21. - &artifact_env
  22. path: ~/babel/packages/babel-preset-env-standalone/babel-preset-env.js
  23. - &artifact_env_min
  24. path: ~/babel/packages/babel-preset-env-standalone/babel-preset-env.min.js
  25. jobs:
  26. build:
  27. working_directory: ~/babel
  28. docker:
  29. - image: circleci/node:10
  30. steps:
  31. - checkout
  32. - restore-cache: *restore-yarn-cache
  33. - restore-cache: *restore-node-modules-cache
  34. - run: yarn --version
  35. - run: make test-ci-coverage
  36. # Builds babel-standalone with the regular Babel config
  37. - run: make build
  38. # test-ci-coverage doesn't test babel-standalone, as trying to gather coverage
  39. # data for a JS file that's several megabytes large is bound to fail. Here,
  40. # we just run the babel-standalone test separately.
  41. - run: ./node_modules/.bin/jest packages/babel-standalone/test/
  42. - run: ./node_modules/.bin/jest packages/babel-preset-env-standalone/test/
  43. - store_artifacts: *artifact_babel
  44. - store_artifacts: *artifact_babel_min
  45. - store_artifacts: *artifact_env
  46. - store_artifacts: *artifact_env_min
  47. - save_cache: *save-node-modules-cache
  48. - save_cache: *save-yarn-cache