config.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. version: 2
  2. references:
  3. test-steps: &test-steps
  4. - checkout
  5. - restore_cache:
  6. keys:
  7. - v2-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "package.json" }}
  8. - run: npm install
  9. - run: npm run build
  10. - run: npm run ${BUILDTARGET}
  11. - run: npm run ${TESTTARGET}
  12. - save_cache:
  13. key: v2-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "package.json" }}
  14. paths:
  15. - node_modules
  16. jobs:
  17. unittest-node8:
  18. docker:
  19. - image: circleci/node:8-browsers
  20. steps: *test-steps
  21. environment:
  22. BUILDTARGET: build:unittests
  23. TESTTARGET: test:unittests
  24. unittest-node10:
  25. docker:
  26. - image: circleci/node:10-browsers
  27. steps: *test-steps
  28. environment:
  29. BUILDTARGET: build:unittests
  30. TESTTARGET: test:unittests
  31. uitest-firefox:
  32. docker:
  33. - image: circleci/node:10-browsers
  34. steps: *test-steps
  35. environment:
  36. BUILDTARGET: build:uitests
  37. TESTTARGET: test:uitests firefox:headless
  38. uitest-chrome:
  39. docker:
  40. - image: circleci/node:10-browsers
  41. steps: *test-steps
  42. environment:
  43. BUILDTARGET: build:uitests
  44. TESTTARGET: test:uitests firefox:headless
  45. lint:
  46. docker:
  47. - image: circleci/node:8-browsers
  48. steps:
  49. - checkout
  50. - restore_cache:
  51. keys:
  52. - v2-dependencies-test-node8-{{ arch }}-{{ checksum "package.json" }}
  53. - run: npm install
  54. - run: npm run lint
  55. workflows:
  56. version: 2
  57. build:
  58. jobs:
  59. - unittest-node8
  60. - unittest-node10
  61. - uitest-firefox
  62. - uitest-chrome
  63. - lint