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

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: depends_on:
- dependencies - dependencies
# Building in dev mode to avoid the service worker for testing - name: build
- name: build-dev
image: node:16 image: node:16
pull: true pull: true
environment: environment:
YARN_CACHE_FOLDER: .cache/yarn/ 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: commands:
- yarn build --dest dist-prod - yarn build --dest dist-prod
depends_on: depends_on:
@ -120,11 +107,10 @@ steps:
CYPRESS_DEFAULT_COMMAND_TIMEOUT: 60000 CYPRESS_DEFAULT_COMMAND_TIMEOUT: 60000
commands: commands:
- sed -i 's/localhost/api/g' dist/index.html - 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 - yarn test:frontend --browser chrome
depends_on: depends_on:
- dependencies - dependencies
- build-dev
- name: upload-test-results - name: upload-test-results
image: plugins/s3:1 image: plugins/s3:1

2
.gitignore vendored
View File

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

View File

@ -4,8 +4,9 @@
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vite", "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": "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", "build:report": "vue-cli-service build --report",
"lint": "vue-cli-service lint --ignore-pattern '*.test.*'", "lint": "vue-cli-service lint --ignore-pattern '*.test.*'",
"cypress:open": "cypress open", "cypress:open": "cypress open",