refactor(cypress): refs #6695 simplify parallel test execution script
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
parent
8a99da0fba
commit
bc7ad3e32b
|
@ -118,10 +118,7 @@ pipeline {
|
||||||
def image = docker.build('lilium-dev', '-f docs/Dockerfile.dev docs')
|
def image = docker.build('lilium-dev', '-f docs/Dockerfile.dev docs')
|
||||||
sh "docker-compose ${env.COMPOSE_PARAMS} up -d"
|
sh "docker-compose ${env.COMPOSE_PARAMS} up -d"
|
||||||
image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ") {
|
image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ") {
|
||||||
sh '''#!/bin/bash
|
sh 'sh test/cypress/cypressParallel.sh 2'
|
||||||
source test/cypress/cypressParallel.sh
|
|
||||||
cypressParallel 2 || true
|
|
||||||
'''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
cypressParallel() {
|
#!/bin/bash
|
||||||
# TEST_PATHS=(
|
|
||||||
# '...'
|
find 'test/cypress/integration' -mindepth 1 -maxdepth 1 -type d | xargs -P "$1" -I {} sh -c 'echo "🔷 {}" && xvfb-run -a cypress run --headless --browser chromium --spec "{}" --quiet > /dev/null 2>&1'
|
||||||
# )
|
wait
|
||||||
# printf "%s\n" "${TEST_PATHS[@]}" | xargs -P $1 -I {} sh -c 'xvfb-run -a cypress run --headless --browser chromium --spec {}'
|
|
||||||
find 'test/cypress/integration' -mindepth 1 -maxdepth 1 -type d | xargs -P "$1" -I {} sh -c 'echo "🔷 {}" && xvfb-run -a cypress run --headless --browser chromium --spec "{}" --quiet > /dev/null 2>&1'
|
|
||||||
wait
|
|
||||||
}
|
|
||||||
|
|
|
@ -23,9 +23,6 @@ docker run -it --rm \
|
||||||
-e CI \
|
-e CI \
|
||||||
-e TZ \
|
-e TZ \
|
||||||
lilium-dev \
|
lilium-dev \
|
||||||
bash -c '
|
bash -c 'sh test/cypress/cypressParallel.sh 2'
|
||||||
source test/cypress/cypressParallel.sh
|
|
||||||
cypressParallel 2
|
|
||||||
'
|
|
||||||
|
|
||||||
cleanup
|
cleanup
|
||||||
|
|
Loading…
Reference in New Issue