wercker.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. box: node:6.10
  2. services:
  3. - mongo:3.4
  4. test:
  5. steps:
  6. - script:
  7. name: set yarn cache-folder
  8. code: yarn config set cache-folder $WERCKER_CACHE_DIR/yarn
  9. - script:
  10. name: install dependencies
  11. code: |
  12. yarn global add npm@4
  13. # add assets-webpack-plugin individually
  14. # because `yarn install` couldn't find package from the "npm" registry
  15. yarn add assets-webpack-plugin
  16. yarn install
  17. - script:
  18. name: print dependencies
  19. code: yarn list --depth=0
  20. - script:
  21. name: npm test
  22. code: |
  23. export MONGO_URI=mongodb://$MONGO_PORT_27017_TCP_ADDR/crowi_test
  24. echo "export MONGO_URI=$MONGO_URI"
  25. npm test
  26. build-prod:
  27. steps:
  28. - script:
  29. name: set yarn cache-folder
  30. code: yarn config set cache-folder $WERCKER_CACHE_DIR/yarn
  31. - script:
  32. name: install dependencies
  33. code: |
  34. yarn global add npm@4
  35. # add assets-webpack-plugin individually
  36. # because `yarn install` couldn't find package from the "npm" registry
  37. yarn add assets-webpack-plugin
  38. yarn install
  39. - script:
  40. name: print dependencies
  41. code: yarn list --depth=0
  42. - script:
  43. name: npm run build:prod
  44. code: |
  45. npm run build:prod
  46. build-dev:
  47. steps:
  48. - script:
  49. name: set yarn cache-folder
  50. code: yarn config set cache-folder $WERCKER_CACHE_DIR/yarn
  51. - script:
  52. name: install dependencies
  53. code: |
  54. yarn global add npm@4
  55. # add assets-webpack-plugin individually
  56. # because `yarn install` couldn't find package from the "npm" registry
  57. yarn add assets-webpack-plugin
  58. yarn install
  59. - script:
  60. name: print dependencies
  61. code: yarn list --depth=0
  62. - script:
  63. name: npm run build:dev
  64. code: |
  65. npm run build:dev