wercker.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. # install assets-webpack-plugin with npm
  14. # because yarn couldn't find package from the "npm" registry
  15. npm install assets-webpack-plugin
  16. yarn install
  17. - script:
  18. name: print dependencies
  19. code: yarn list --depth=0
  20. - script:
  21. name: set MONGO_URI
  22. code: |
  23. export MONGO_URI=mongodb://$MONGO_PORT_27017_TCP_ADDR/crowi_test
  24. echo 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. # install assets-webpack-plugin with npm
  36. # because yarn couldn't find package from the "npm" registry
  37. npm install assets-webpack-plugin
  38. yarn install --production
  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. # install assets-webpack-plugin with npm
  56. # because yarn couldn't find package from the "npm" registry
  57. npm install 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