salix-front/test/cypress/cypressParallel.sh

10 lines
640 B
Bash

cypressParallel() {
TEST_PATHS=(
'test/cypress/integration/client/*.spec.js'
)
# printf "%s\n" "${TEST_PATHS[@]}" | xargs -P $1 -I {} sh -c 'xvfb-run -a cypress run --headless --browser chromium --spec {}'
# find 'test/cypress/integration' -name "*.spec.js" | xargs -P "$1" -I {} sh -c 'echo "🔷 {}" && xvfb-run -a cypress run --headless --browser chromium --spec "{}" --quiet > /dev/null 2>&1'
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
}