config.yml 965 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. version: 2
  2. references:
  3. test-steps: &test-steps
  4. - checkout
  5. - restore_cache:
  6. keys:
  7. - v1-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "package.json" }}
  8. - run: npm install
  9. - run: npm run build
  10. - run: npm test
  11. - save_cache:
  12. key: v1-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "package.json" }}
  13. paths:
  14. - node_modules
  15. jobs:
  16. test-node8:
  17. docker:
  18. - image: circleci/node:8-browsers
  19. steps: *test-steps
  20. test-node9:
  21. docker:
  22. - image: circleci/node:9-browsers
  23. steps: *test-steps
  24. lint:
  25. docker:
  26. - image: circleci/node:8-browsers
  27. steps:
  28. - checkout
  29. - restore_cache:
  30. keys:
  31. - v1-dependencies-test-node8-{{ arch }}-{{ checksum "package.json" }}
  32. - run: npm install
  33. - run: npm run lint
  34. workflows:
  35. version: 2
  36. build:
  37. jobs:
  38. - test-node8
  39. - test-node9
  40. - lint