fix(cypress scripts): refs #6695 improve cleanup process and adjust output redirection
gitea/salix-front/pipeline/pr-dev Something is wrong with the build of this commit Details

This commit is contained in:
Alex Moreno 2025-03-06 09:13:08 +01:00
parent e5b524e8a0
commit 489e7850ab
2 changed files with 10 additions and 6 deletions

View File

@ -10,6 +10,6 @@ xargs -P "$1" -I {} sh -c '
--headless \ --headless \
--spec "{}" \ --spec "{}" \
--quiet \ --quiet \
> /dev/null 2>&1 > /dev/null
' '
wait wait

14
test/cypress/run.sh Normal file → Executable file
View File

@ -1,15 +1,19 @@
#!/bin/bash #!/bin/bash
cleanup() { cleanup() {
docker-compose -p e2e --project-directory . -f test/cypress/docker-compose.yml down || true if [[ -z "$ended" ]]; then
ended=true
docker-compose -p e2e --project-directory . -f test/cypress/docker-compose.yml down -v
fi
} }
trap cleanup SIGINT trap cleanup SIGINT
#CLEAN #CLEAN
rm -rf test/cypress/screenshots rm -f test/cypress/screenshots/*
rm -rf test/cypress/results rm -f test/cypress/results/*
rm -rf test/cypress/reports rm -f test/cypress/reports/*
rm -rf junit rm -f junit/e2e-*.xml
#RUN #RUN
export CI=true export CI=true