test: Test fix CYPRESS_BASE_URL
This commit is contained in:
parent
cba1b538e5
commit
1efd2eab5a
@ -38,14 +38,29 @@ steps:
|
|||||||
- npm -v
|
- npm -v
|
||||||
- yarn --version
|
- yarn --version
|
||||||
- yarn --cwd ./items/frontend install
|
- yarn --cwd ./items/frontend install
|
||||||
|
depends_on:
|
||||||
|
- replace hosts and user variables
|
||||||
|
|
||||||
|
- name: frontend
|
||||||
|
image: node:lts-alpine3.14
|
||||||
|
commands:
|
||||||
|
- node -v
|
||||||
|
- npm -v
|
||||||
|
- yarn --version
|
||||||
|
- yarn --cwd ./items/frontend start
|
||||||
|
detach: true
|
||||||
|
depends_on:
|
||||||
|
- install frontend dependencies
|
||||||
|
|
||||||
- name: test frontend
|
- name: test frontend
|
||||||
image: cypress/base:16.13.0
|
image: cypress/browsers:chrome95
|
||||||
commands:
|
commands:
|
||||||
- node -v
|
- node -v
|
||||||
- npm -v
|
- npm -v
|
||||||
- yarn --version
|
- yarn --version
|
||||||
- yarn --cwd ./items/frontend cy:run
|
- yarn --cwd ./items/frontend cy:run
|
||||||
|
depends_on:
|
||||||
|
- install frontend dependencies
|
||||||
|
|
||||||
- name: build frontend
|
- name: build frontend
|
||||||
image: node:lts-alpine3.14
|
image: node:lts-alpine3.14
|
||||||
@ -57,6 +72,8 @@ steps:
|
|||||||
- rm -rf ./items/api/public/static/*
|
- rm -rf ./items/api/public/static/*
|
||||||
- mv ./items/frontend/build/* ./items/api/public
|
- mv ./items/frontend/build/* ./items/api/public
|
||||||
- rm ./items/api/public/index.html
|
- rm ./items/api/public/index.html
|
||||||
|
depends_on:
|
||||||
|
- test frontend
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
@ -93,6 +110,9 @@ steps:
|
|||||||
from_secret: deploy_user_group
|
from_secret: deploy_user_group
|
||||||
SPT_ITEMS_PATH:
|
SPT_ITEMS_PATH:
|
||||||
from_secret: deploy_path
|
from_secret: deploy_path
|
||||||
|
depends_on:
|
||||||
|
- check ansible syntax
|
||||||
|
- build frontend
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
|
@ -37,9 +37,10 @@
|
|||||||
"build": "react-scripts build",
|
"build": "react-scripts build",
|
||||||
"test:jest": "react-scripts test",
|
"test:jest": "react-scripts test",
|
||||||
"cy:start:app": "cross-env BROWSER=none react-scripts -r @cypress/instrument-cra start",
|
"cy:start:app": "cross-env BROWSER=none react-scripts -r @cypress/instrument-cra start",
|
||||||
"cy:start:wait": "start-server-and-test cy:start:app",
|
"cy:start:wait": "start-server-and-test cy:start:app http://localhost:3000",
|
||||||
|
"cy:start:wait:ci": "start-server-and-test cy:start:app http://frontend:3000",
|
||||||
"cy:open": "yarn run cy:start:wait -- \"cypress open\"",
|
"cy:open": "yarn run cy:start:wait -- \"cypress open\"",
|
||||||
"cy:run": "yarn run cy:start:wait -- \"cypress run\"",
|
"cy:run": "yarn run cy:start:wait:ci -- \"cypress run\"",
|
||||||
"eject": "react-scripts eject"
|
"eject": "react-scripts eject"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user