refactor(cypress): refs #8698 restructure parallel test execution and cleanup scripts
gitea/salix-front/pipeline/pr-dev Something is wrong with the build of this commit
Details
gitea/salix-front/pipeline/pr-dev Something is wrong with the build of this commit
Details
This commit is contained in:
parent
cf261828db
commit
22a978098e
|
@ -128,8 +128,7 @@ pipeline {
|
|||
sh "docker-compose ${env.COMPOSE_PARAMS} up -d"
|
||||
|
||||
image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ") {
|
||||
// sh "cypress run --browser chromium --spec '${modules}' || true"
|
||||
sh 'sh test/cypress/cypressParallel.sh 2'
|
||||
sh "sh test/cypress/docker/cypressParallel.sh 2 '${modules}'"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
#!/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 \
|
||||
--spec "{}" \
|
||||
--quiet \
|
||||
> /dev/null
|
||||
'
|
||||
wait
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -z "$2" ]; then
|
||||
TEST_DIRS=$(find 'test/cypress/integration' -mindepth 1 -maxdepth 1 -type d)
|
||||
else
|
||||
TEST_DIRS=$2
|
||||
fi
|
||||
|
||||
# Ejecutar Cypress en paralelo
|
||||
# echo $TEST_DIRS x$1
|
||||
|
||||
echo "$TEST_DIRS" | xargs -P "$1" -I {} sh -c '
|
||||
echo "🔷 {}" &&
|
||||
xvfb-run -a cypress run \
|
||||
--headless \
|
||||
--spec "{}" \
|
||||
--quiet \
|
||||
> /dev/null
|
||||
'
|
||||
wait
|
|
@ -22,7 +22,7 @@ async function getChangedModules() {
|
|||
...new Set(getModules(await findImports(change))),
|
||||
]);
|
||||
}
|
||||
return [...changedModules].join(',');
|
||||
return [...changedModules].join(' ');
|
||||
}
|
||||
|
||||
getChangedModules()
|
||||
|
|
|
@ -20,6 +20,8 @@ export CI=true
|
|||
export TZ=Europe/Madrid
|
||||
|
||||
docker-compose -p e2e --project-directory . -f test/cypress/docker-compose.yml up -d
|
||||
files=$(node test/cypress/docker/find/find.js)
|
||||
echo $files
|
||||
|
||||
docker run -it --rm \
|
||||
-v "$(pwd)":/app \
|
||||
|
@ -27,6 +29,6 @@ docker run -it --rm \
|
|||
-e CI \
|
||||
-e TZ \
|
||||
lilium-dev \
|
||||
bash -c 'sh test/cypress/cypressParallel.sh 2'
|
||||
bash -c "sh test/cypress/docker/cypressParallel.sh 2 $files"
|
||||
|
||||
cleanup
|
Loading…
Reference in New Issue