Merged in feature/use_currents_dev (pull request #12)

Use currents.dev for running Cypress tests in parallel

Approved-by: Christian Cueni
This commit is contained in:
Elia Bieri 2022-12-15 08:32:37 +00:00 committed by Christian Cueni
commit 20c2a7e28a
3 changed files with 50 additions and 25 deletions

View File

@ -1,8 +1,54 @@
# this test is based on the docker image described in env/bitbucket/Dockerfile
image: iterativ/vbv-lernwelt-bitbucket
## job definition for running Cypress tests in parallel
e2e: &e2e
name: Cypress test worker
max-time: 45
services:
- postgres
caches:
- node
- clientnode
- vbvpip
- cypress
script:
- export CURRENTS_KEY=etzp5VXtJcSX8Z4H
- export IT_SERVE_VUE=false
- export IT_ALLOW_LOCAL_LOGIN=true
- source ./env/bitbucket/prepare_for_test.sh
- source vbvvenv/bin/activate
- ./prepare_server_cypress.sh --start-background
- npm run cypress:ci
artifacts:
- cypress/**/*.png
- cypress/**/*.mp4
pipelines:
default:
- step:
name: install cypress dependencies
services:
- postgres
caches:
- node
- clientnode
- vbvpip
- cypress
script:
- export IT_SERVE_VUE=false
- export IT_ALLOW_LOCAL_LOGIN=true
- source ./env/bitbucket/prepare_for_test.sh
- npm install
- npm run build
- python -m venv vbvvenv
- source vbvvenv/bin/activate
- pip install -r server/requirements/requirements-dev.txt
- parallel:
- step:
<<: *e2e
- step:
<<: *e2e
- step:
name: python tests
max-time: 15
@ -55,30 +101,7 @@ pipelines:
- npm run prettier:check
- npm run lint
- npm run typecheck
- step:
name: cypress tests
max-time: 45
services:
- postgres
artifacts:
- cypress/**/*.png
- cypress/**/*.mp4
caches:
- node
- clientnode
- vbvpip
- cypress
script:
- export IT_SERVE_VUE=false
- export IT_ALLOW_LOCAL_LOGIN=true
- source ./env/bitbucket/prepare_for_test.sh
- npm install
- npm run build
- python -m venv vbvvenv
- source vbvvenv/bin/activate
- pip install -r server/requirements/requirements-dev.txt
- ./prepare_server_cypress.sh --start-background
- npm run cypress:ci
tags:
v202*:
- step:

View File

@ -1,6 +1,7 @@
const { defineConfig } = require('cypress')
module.exports = defineConfig({
projectId: 'RVEZS1',
watchForFileChanges: false,
video: false,
viewportWidth: 1280,

View File

@ -5,10 +5,11 @@
"build": "npm install --prefix client && npm run build --prefix client && npm run build:tailwind --prefix client",
"test": "echo \"Error: no test specified\" && exit 1",
"cypress:open": "cypress open",
"cypress:ci": "cypress run",
"cypress:ci": "currents run --parallel --record --key $CURRENTS_KEY",
"prettier": "npm run prettier --prefix client"
},
"devDependencies": {
"@currents/cli": "^3.1.3",
"cypress": "^10.6.0"
},
"dependencies": {