From bc7ad3e32b5f08d44b96a3ca093c96aa2fca21fb Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 4 Mar 2025 12:30:47 +0100 Subject: [PATCH] refactor(cypress): refs #6695 simplify parallel test execution script --- Jenkinsfile | 5 +---- test/cypress/cypressParallel.sh | 12 ++++-------- test/cypress/run.sh | 5 +---- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index cd0f40b01..1694aa29c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -118,10 +118,7 @@ pipeline { def image = docker.build('lilium-dev', '-f docs/Dockerfile.dev docs') sh "docker-compose ${env.COMPOSE_PARAMS} up -d" image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ") { - sh '''#!/bin/bash - source test/cypress/cypressParallel.sh - cypressParallel 2 || true - ''' + sh 'sh test/cypress/cypressParallel.sh 2' } } } diff --git a/test/cypress/cypressParallel.sh b/test/cypress/cypressParallel.sh index c39af399f..370f22ded 100644 --- a/test/cypress/cypressParallel.sh +++ b/test/cypress/cypressParallel.sh @@ -1,8 +1,4 @@ -cypressParallel() { - # TEST_PATHS=( - # '...' - # ) - # 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 -} +#!/bin/bash + +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 diff --git a/test/cypress/run.sh b/test/cypress/run.sh index 4c9c26416..b3082697c 100644 --- a/test/cypress/run.sh +++ b/test/cypress/run.sh @@ -23,9 +23,6 @@ docker run -it --rm \ -e CI \ -e TZ \ lilium-dev \ - bash -c ' - source test/cypress/cypressParallel.sh - cypressParallel 2 - ' + bash -c 'sh test/cypress/cypressParallel.sh 2' cleanup