test: Test fix CYPRESS_BASE_URL
This commit is contained in:
parent
cba1b538e5
commit
1efd2eab5a
@ -38,14 +38,29 @@ steps:
|
||||
- npm -v
|
||||
- yarn --version
|
||||
- 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
|
||||
image: cypress/base:16.13.0
|
||||
image: cypress/browsers:chrome95
|
||||
commands:
|
||||
- node -v
|
||||
- npm -v
|
||||
- yarn --version
|
||||
- yarn --cwd ./items/frontend cy:run
|
||||
depends_on:
|
||||
- install frontend dependencies
|
||||
|
||||
- name: build frontend
|
||||
image: node:lts-alpine3.14
|
||||
@ -57,6 +72,8 @@ steps:
|
||||
- rm -rf ./items/api/public/static/*
|
||||
- mv ./items/frontend/build/* ./items/api/public
|
||||
- rm ./items/api/public/index.html
|
||||
depends_on:
|
||||
- test frontend
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
@ -93,6 +110,9 @@ steps:
|
||||
from_secret: deploy_user_group
|
||||
SPT_ITEMS_PATH:
|
||||
from_secret: deploy_path
|
||||
depends_on:
|
||||
- check ansible syntax
|
||||
- build frontend
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
|
@ -37,9 +37,10 @@
|
||||
"build": "react-scripts build",
|
||||
"test:jest": "react-scripts test",
|
||||
"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:run": "yarn run cy:start:wait -- \"cypress run\"",
|
||||
"cy:run": "yarn run cy:start:wait:ci -- \"cypress run\"",
|
||||
"eject": "react-scripts eject"
|
||||
},
|
||||
"eslintConfig": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user