From 2d7b814700a57c422e211519f4fdbdeab1af39a7 Mon Sep 17 00:00:00 2001 From: Mangiang Date: Mon, 15 Nov 2021 22:41:10 -0500 Subject: [PATCH] tests: fix nginx testing setup --- .drone-docker.yml | 8 +++++--- .drone-kubernetes.yml | 2 +- .../src/cypress/{fixtures => nginx_config}/default.conf | 0 3 files changed, 6 insertions(+), 4 deletions(-) rename items/frontend/src/cypress/{fixtures => nginx_config}/default.conf (100%) diff --git a/.drone-docker.yml b/.drone-docker.yml index 5907b62..130dc28 100644 --- a/.drone-docker.yml +++ b/.drone-docker.yml @@ -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 diff --git a/.drone-kubernetes.yml b/.drone-kubernetes.yml index 758bc55..f0c8d9d 100644 --- a/.drone-kubernetes.yml +++ b/.drone-kubernetes.yml @@ -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: diff --git a/items/frontend/src/cypress/fixtures/default.conf b/items/frontend/src/cypress/nginx_config/default.conf similarity index 100% rename from items/frontend/src/cypress/fixtures/default.conf rename to items/frontend/src/cypress/nginx_config/default.conf