react-native-webview.git

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. defaults: &defaults
  2. working_directory: ~/code
  3. docker:
  4. - image: circleci/node:10.6.0-browsers
  5. version: 2
  6. jobs:
  7. setup:
  8. <<: *defaults
  9. steps:
  10. - checkout
  11. - restore_cache:
  12. name: Restore node modules
  13. keys:
  14. - node_modules-{{ arch }}-{{ checksum "yarn.lock" }}
  15. - run:
  16. name: Install dependencies
  17. command: yarn --pure-lockfile
  18. - save_cache:
  19. name: Save node modules
  20. key: node_modules-{{ arch }}-{{ checksum "yarn.lock" }}
  21. paths:
  22. - node_modules
  23. tests:
  24. <<: *defaults
  25. steps:
  26. - checkout
  27. - restore_cache:
  28. name: Restore node modules
  29. keys:
  30. - node_modules-{{ arch }}-{{ checksum "yarn.lock" }}
  31. - run:
  32. name: Run Tests
  33. command: yarn ci
  34. publish:
  35. <<: *defaults
  36. steps:
  37. - checkout
  38. - restore_cache:
  39. name: Restore node modules
  40. keys:
  41. - node_modules-{{ arch }}-{{ checksum "yarn.lock" }}
  42. - run:
  43. name: Publish to NPM
  44. command: yarn ci:publish
  45. workflows:
  46. version: 2
  47. ci:
  48. jobs:
  49. - setup
  50. - tests:
  51. requires:
  52. - setup
  53. - publish:
  54. requires:
  55. - tests
  56. filters:
  57. branches:
  58. only: master