You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ---
  2. #################
  3. # Frontend Test #
  4. #################
  5. kind: pipeline
  6. type: docker
  7. name: frontend_run_tests
  8. steps:
  9. - name: test-frontend
  10. image: node
  11. volumes:
  12. - name: frontend_node_cache
  13. path: /drone/src/frontend/node_modules
  14. commands:
  15. - pwd
  16. - cd ./frontend
  17. - npm install
  18. - npm test
  19. volumes:
  20. - name: frontend_node_cache
  21. host:
  22. path: /tmp/cache/drone/frontend/node_modules
  23. ---
  24. #################
  25. # Backend Tests #
  26. #################
  27. kind: pipeline
  28. type: docker
  29. name: backend_run_tests
  30. steps:
  31. - name: test-backend
  32. image: node
  33. volumes:
  34. - name: backend_node_cache
  35. path: /drone/src/backend/node_modules
  36. commands:
  37. - pwd
  38. - cd ./backend
  39. - npm install
  40. - npm test
  41. volumes:
  42. - name: backend_node_cache
  43. host:
  44. path: /tmp/cache/drone/backend/node_modules
  45. ---
  46. ##################
  47. # Frontend Build #
  48. ##################
  49. kind: pipeline
  50. type: docker
  51. name: frontend_run_build
  52. depends_on:
  53. - frontend_run_tests
  54. - backend_run_tests
  55. trigger:
  56. status:
  57. - success
  58. branch:
  59. - dev
  60. steps:
  61. - name: build-frontend
  62. image: node
  63. volumes:
  64. - name: frontend_node_cache
  65. path: /drone/src/frontend/node_modules
  66. - name: frontend_build
  67. path: /drone/src/frontend/build
  68. commands:
  69. - cd ./frontend
  70. - rm -Rf ./build/*
  71. - npx browserslist@latest --update-db
  72. - npm run build
  73. - ls ./build
  74. environment:
  75. NODE_OPTIONS: --openssl-legacy-provider
  76. volumes:
  77. - name: frontend_node_cache
  78. host:
  79. path: /tmp/cache/drone/frontend/node_modules
  80. - name: frontend_build
  81. host:
  82. path: /tmp/cache/drone/frontend/build