config.yml 996 B

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