Add new manual pipeline step

This commit is contained in:
Ramon Wenger 2021-08-24 12:13:25 +02:00
parent ea7a2b76a9
commit 4aca082621
2 changed files with 47 additions and 0 deletions

21
bin/run-cypress-parallel.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
if [[ -z "${CYPRESS_API_URL+x}" ]]; then
echo "CYPRESS_API_URL not set"
exit 1
fi
if [[ -z "${CYPRESS_RECORD_KEY+x}" ]]; then
echo "CYPRESS_RECORD_KEY not set"
exit 2
fi
if [[ -z "${BITBUCKET_BUILD_NUMBER+x}" ]]; then
echo "BITBUCKET_BUILD_NUMBER not set"
exit 2
fi
run_test_instance() {
cd client
build_id="myskillbox-run-${BITBUCKET_BUILD_NUMBER}"
npx cy2 run --parallel --record --config-file cypress.frontend.json --ci-build-id ${build_id}
}
run_test_instance

View File

@ -80,6 +80,23 @@ aliases:
- sleep 30
- curl http://localhost:8080/beta-login
- npm run --prefix client test:cypress:frontend
- &frontend-test-parallel
name: run cypress frontend tests
caches:
- node
- clientmodules
- npm
- cypress
artifacts:
- client/cypress/**/*.png
- client/cypress/**/*.mp4
script:
- npm ci --prefix client
- npm run "install:cypress" --prefix client
- npm run dev --prefix client 2>&1 > /dev/null &
- sleep 30
- curl http://localhost:8080/beta-login
- source bin/run-cypress-parallel.sh
- &jest-test
name: run jest tests
caches:
@ -165,3 +182,12 @@ pipelines:
- step: *jest-test
- parallel:
- step: *deploy-prod-manual
cypress-parallel:
- parallel:
- step: *frontend-test-parallel
- step: *frontend-test-parallel
- step: *frontend-test-parallel
- step: *frontend-test-parallel
- step: *frontend-test-parallel
- step: *frontend-test-parallel