tests: fix nginx testing setup

This commit is contained in:
SPT-dev 2023-03-02 21:13:02 -05:00
parent 64848518c8
commit 1cf70a9b8b
3 changed files with 6 additions and 4 deletions

View File

@ -40,7 +40,7 @@ steps:
- yarn --cwd ./items/frontend install
- yarn --cwd ./items/frontend build --pure-lockfile
- rm -rf ./items/api/public/static/*
- cp ./items/frontend/build/* ./items/api/public
- cp -r ./items/frontend/build/* ./items/api/public
- rm ./items/api/public/index.html
depends_on:
- replace hosts and user variables
@ -48,7 +48,9 @@ steps:
- name: frontend
image: nginx:1.21.4-alpine
commands:
- cp ./items/frontend/build/* /usr/share/nginx/html
- cp -r ./items/frontend/build/* /usr/share/nginx/html
- cp ./items/frontend/src/cypress/nginx_config/default.conf /etc/nginx/conf.d/default.conf
- nginx -g "daemon off;"
detach: true
depends_on:
- install dependencies and build frontend
@ -59,7 +61,7 @@ steps:
- node -v
- npm -v
- yarn --version
- yarn --cwd ./items/frontend cy:run
- yarn --cwd ./items/frontend cy:ci
depends_on:
- install dependencies and build frontend

View File

@ -49,7 +49,7 @@ steps:
image: nginx:1.21.4-alpine
commands:
- cp -r ./items/frontend/build/* /usr/share/nginx/html
- cp ./items/frontend/src/cypress/fixtures/default.conf /etc/nginx/conf.d/default.conf
- cp ./items/frontend/src/cypress/nginx_config/default.conf /etc/nginx/conf.d/default.conf
- nginx -g "daemon off;"
detach: true
depends_on: