config.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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:unit
  24. unittest-node10:
  25. docker:
  26. - image: circleci/node:10-browsers
  27. steps: *test-steps
  28. environment:
  29. BUILDTARGET: build:unittests
  30. TESTTARGET: test:unit
  31. uitest-firefox:
  32. docker:
  33. - image: circleci/node:10-browsers
  34. steps: *test-steps
  35. environment:
  36. BUILDTARGET: build:uitests
  37. TESTTARGET: test:ui firefox
  38. uitest-chrome:
  39. docker:
  40. - image: circleci/node:10-browsers
  41. steps: *test-steps
  42. environment:
  43. BUILDTARGET: build:uitests
  44. TESTTARGET: test:ui chrome
  45. dist:
  46. docker:
  47. - image: circleci/node:10-browsers
  48. steps:
  49. - checkout
  50. - restore_cache:
  51. keys:
  52. - v2-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "package.json" }}
  53. - run: npm install --release
  54. - run: npm run dist
  55. - save_cache:
  56. key: v2-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "package.json" }}
  57. paths:
  58. - node_modules
  59. lint:
  60. docker:
  61. - image: circleci/node:8-browsers
  62. steps:
  63. - checkout
  64. - restore_cache:
  65. keys:
  66. - v2-dependencies-test-node8-{{ arch }}-{{ checksum "package.json" }}
  67. - run: npm install
  68. - run: npm run lint
  69. workflows:
  70. version: 2
  71. build:
  72. jobs:
  73. - unittest-node8
  74. - unittest-node10
  75. - uitest-firefox
  76. - uitest-chrome
  77. - dist
  78. - lint