| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- ---
- #################
- # Frontend Test #
- #################
- kind: pipeline
- type: docker
- name: frontend_run_tests
-
- steps:
- - name: test-frontend
- image: node
- volumes:
- - name: frontend_node_cache
- path: /drone/src/frontend/node_modules
- commands:
- - pwd
- - cd ./frontend
- - npm install
- - npm test
-
- volumes:
- - name: frontend_node_cache
- host:
- path: /tmp/cache/drone/frontend/node_modules
- ---
- ##################
- # Frontend Build #
- ##################
-
- kind: pipeline
- type: docker
- name: frontend_run_build
- depends_on:
- - frontend_run_tests
- trigger:
- status:
- - success
- branch:
- - dev
-
- steps:
- - name: build-frontend
- image: node
- volumes:
- - name: frontend_node_cache
- path: /drone/src/frontend/node_modules
- - name: frontend_build
- path: /drone/src/frontend/build
- commands:
- - cd ./frontend
- - rm -Rf ./build/*
- - npx browserslist@latest --update-db
- - npm run build
- - ls ./build
- environment:
- NODE_OPTIONS: --openssl-legacy-provider
-
- volumes:
- - name: frontend_node_cache
- host:
- path: /tmp/cache/drone/frontend/node_modules
- - name: frontend_build
- host:
- path: /tmp/cache/drone/frontend/build
- ---
- #################
- # Backend Tests #
- #################
-
- kind: pipeline
- type: docker
- name: backend_run_tests
-
- steps:
- - name: test-backend
- image: node
- volumes:
- - name: backend_node_cache
- path: /drone/src/backend/node_modules
- commands:
- - pwd
- - cd ./backend
- - npm install
- - npm test
-
- volumes:
- - name: backend_node_cache
- host:
- path: /tmp/cache/drone/backend/node_modules
|