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.

.drone.yml 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. # Frontend Build #
  26. ##################
  27. kind: pipeline
  28. type: docker
  29. name: frontend_run_build
  30. depends_on:
  31. - frontend_run_tests
  32. trigger:
  33. status:
  34. - success
  35. branch:
  36. - dev
  37. steps:
  38. - name: build-frontend
  39. image: node
  40. volumes:
  41. - name: frontend_node_cache
  42. path: /drone/src/frontend/node_modules
  43. - name: frontend_build
  44. path: /drone/src/frontend/build
  45. commands:
  46. - cd ./frontend
  47. - rm -Rf ./build/*
  48. - npx browserslist@latest --update-db
  49. - npm run build
  50. - ls ./build
  51. environment:
  52. NODE_OPTIONS: --openssl-legacy-provider
  53. volumes:
  54. - name: frontend_node_cache
  55. host:
  56. path: /tmp/cache/drone/frontend/node_modules
  57. - name: frontend_build
  58. host:
  59. path: /tmp/cache/drone/frontend/build
  60. ---
  61. #################
  62. # Backend Tests #
  63. #################
  64. kind: pipeline
  65. type: docker
  66. name: backend_run_tests
  67. steps:
  68. - name: test-backend
  69. image: node
  70. volumes:
  71. - name: backend_node_cache
  72. path: /drone/src/backend/node_modules
  73. commands:
  74. - pwd
  75. - cd ./backend
  76. - npm install
  77. - npm test
  78. volumes:
  79. - name: backend_node_cache
  80. host:
  81. path: /tmp/cache/drone/backend/node_modules