Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(pre-push): run phpunit in parallel mode when detecting a macOS or Linux system #2652

Merged
merged 7 commits into from
Aug 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .hooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ npx eslint --quiet
printf "\n⏳ npm run test\n"
npm run test

printf "\n⏳ composer test\n"
vendor/bin/phpunit
# Check the OS. Windows does not support the --parallel flag.
if [ "$(uname)" = "Linux" ] || [ "$(uname)" = "Darwin" ]; then
# Use --parallel if macOS or Linux are detected.
printf "\n⏳ composer test -- --parallel\n"
vendor/bin/paratest
else
# If neither of those are detected, don't use --parallel.
printf "\n⏳ composer test\n"
vendor/bin/phpunit
fi

printf "\n✅ pre-push OK\n\n"
Loading