Don't build a dev version for testing
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
kolaente 2021-07-25 14:02:37 +02:00
parent afc2a422b8
commit bd07c459d3
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 5 additions and 18 deletions

View File

@ -78,24 +78,11 @@ steps:
depends_on:
- dependencies
# Building in dev mode to avoid the service worker for testing
- name: build-dev
- name: build
image: node:16
pull: true
environment:
YARN_CACHE_FOLDER: .cache/yarn/
CYPRESS_CACHE_FOLDER: .cache/cypress/
commands:
- yarn build --mode dev
depends_on:
- dependencies
- name: build-prod
image: node:16
pull: true
environment:
YARN_CACHE_FOLDER: .cache/yarn/
CYPRESS_CACHE_FOLDER: .cache/cypress/
commands:
- yarn build --dest dist-prod
depends_on:
@ -120,11 +107,10 @@ steps:
CYPRESS_DEFAULT_COMMAND_TIMEOUT: 60000
commands:
- sed -i 's/localhost/api/g' dist/index.html
- yarn serve:dist & npx wait-on http://localhost:8080
- yarn serve & npx wait-on http://localhost:5000
- yarn test:frontend --browser chrome
depends_on:
- dependencies
- build-dev
- name: upload-test-results
image: plugins/s3:1

2
.gitignore vendored
View File

@ -1,6 +1,6 @@
.DS_Store
node_modules
/dist
/dist*
*.zip
# local env files

View File

@ -4,8 +4,9 @@
"private": true,
"scripts": {
"serve": "vite",
"serve:dist": "node scripts/serve-dist.js",
"serve:dist": "vite preview",
"build": "vite build && rollup -c ./rollup.sw.js && workbox copyLibraries dist/",
"build:dev": "vite build -m development --outDir dist-dev/ && workbox copyLibraries dist-dev/",
"build:report": "vue-cli-service build --report",
"lint": "vue-cli-service lint --ignore-pattern '*.test.*'",
"cypress:open": "cypress open",