Add a run file with a consistent test task

This commit is contained in:
Oliver Davies 2024-01-16 15:55:22 +00:00
parent 9be750fdf7
commit 812ab02bfa
2 changed files with 24 additions and 1 deletions

23
run Executable file
View file

@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -o errexit
set -o nounset
PATH=${PATH}:./vendor/bin
# Display a list of all available commands.
function help {
printf "%s <task> [args]\n\nTasks:\n" "${0}"
compgen -A function | grep -v "^_" | cat -n
printf "\nExtended help:\n Each task has comments for general usage\n"
}
# Run PHPUnit tests.
function test {
paratest --group lessons "${@}"
}
TIMEFORMAT=$'\nTask completed in %3lR'
time "${@:-help}"