config.yml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. version: 2
  2. defaults: &defaults
  3. working_directory: ~/project/vue
  4. docker:
  5. - image: vuejs/ci
  6. jobs:
  7. install:
  8. <<: *defaults
  9. steps:
  10. - checkout
  11. - restore_cache:
  12. keys:
  13. - v1-vue-{{ .Branch }}-{{ checksum "yarn.lock" }}
  14. - v1-vue-{{ .Branch }}-
  15. - v1-vue-
  16. - run: npm install
  17. - save_cache:
  18. key: v1-vue-{{ .Branch }}-{{ checksum "yarn.lock" }}
  19. paths:
  20. - node_modules/
  21. - persist_to_workspace:
  22. root: ~/project
  23. paths:
  24. - vue
  25. lint-flow-types:
  26. <<: *defaults
  27. steps:
  28. - attach_workspace:
  29. at: ~/project
  30. - run: npm run lint
  31. - run: npm run flow
  32. - run: npm run test:types
  33. test-cover:
  34. <<: *defaults
  35. steps:
  36. - attach_workspace:
  37. at: ~/project
  38. - run: npm run test:cover
  39. - run:
  40. name: report coverage stats for non-PRs
  41. command: |
  42. if [[ -z $CI_PULL_REQUEST ]]; then
  43. ./node_modules/.bin/codecov
  44. fi
  45. test-e2e:
  46. <<: *defaults
  47. steps:
  48. - attach_workspace:
  49. at: ~/project
  50. - run: npm run test:e2e -- --env phantomjs
  51. test-ssr-weex:
  52. <<: *defaults
  53. steps:
  54. - attach_workspace:
  55. at: ~/project
  56. - run: npm run test:ssr
  57. - run: npm run test:weex
  58. trigger-regression-test:
  59. <<: *defaults
  60. steps:
  61. - run:
  62. command: |
  63. curl --user ${CIRCLE_TOKEN}: \
  64. --data build_parameters[CIRCLE_JOB]=update \
  65. --data build_parameters[VUE_REVISION]=${CIRCLE_SHA1} \
  66. https://circleci.com/api/v1.1/project/github/vuejs/regression-testing/tree/master
  67. workflows:
  68. version: 2
  69. install-and-parallel-test:
  70. jobs:
  71. - install
  72. - test-cover:
  73. requires:
  74. - install
  75. - lint-flow-types:
  76. requires:
  77. - install
  78. - test-e2e:
  79. requires:
  80. - install
  81. - test-ssr-weex:
  82. requires:
  83. - install
  84. - trigger-regression-test:
  85. filters:
  86. branches:
  87. only:
  88. - "2.6"
  89. - regression-test
  90. requires:
  91. - test-cover
  92. - lint-flow-types
  93. - test-e2e
  94. - test-ssr-weex
  95. weekly_regression_test:
  96. triggers:
  97. - schedule:
  98. # At 13:00 UTC (9:00 EDT) on every Monday
  99. cron: "0 13 * * 1"
  100. filters:
  101. branches:
  102. only:
  103. dev
  104. jobs:
  105. - install
  106. - test-cover:
  107. requires:
  108. - install
  109. - lint-flow-types:
  110. requires:
  111. - install
  112. - test-e2e:
  113. requires:
  114. - install
  115. - test-ssr-weex:
  116. requires:
  117. - install
  118. - trigger-regression-test:
  119. requires:
  120. - test-cover
  121. - lint-flow-types
  122. - test-e2e
  123. - test-ssr-weex