config.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. ---
  2. version: 2
  3. jobs:
  4. node-latest: &test
  5. docker:
  6. - image: node:latest
  7. working_directory: ~/cli
  8. steps:
  9. - checkout
  10. - restore_cache: &restore_cache
  11. keys:
  12. - v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}}
  13. - v1-npm-{{checksum ".circleci/config.yml"}}
  14. - run:
  15. name: Install dependencies
  16. command: yarn
  17. - run:
  18. name: Build plugin
  19. command: yarn prepack
  20. - run:
  21. name: Testing
  22. command: yarn test
  23. - run:
  24. name: Submitting code coverage to codecov
  25. command: |
  26. ./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov
  27. curl -s https://codecov.io/bash | bash
  28. node-8:
  29. <<: *test
  30. docker:
  31. - image: node:8
  32. node-10:
  33. <<: *test
  34. docker:
  35. - image: node:10
  36. cache:
  37. <<: *test
  38. steps:
  39. - checkout
  40. - run:
  41. name: Install dependencies
  42. command: yarn
  43. - save_cache:
  44. key: v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}}
  45. paths:
  46. - ~/cli/node_modules
  47. - /usr/local/share/.cache/yarn
  48. - /usr/local/share/.config/yarn
  49. workflows:
  50. version: 2
  51. "sfdx-allure":
  52. jobs:
  53. - node-latest
  54. - node-8
  55. - node-10
  56. - cache:
  57. filters:
  58. tags:
  59. only: /^v.*/
  60. branches:
  61. ignore: /.*/