Files
php-curl-class/tests/test_all.sh
T
Zach Borboa 87fc9b3796 Use separate scripts to ci tests (#907)
* Run ci static analysis checks using scripts

* Clean up

* Move phpunit run to dedicated script

* Use run.sh and remove ci.sh

* Rename test scripts to be prefixed with "run_"

* Move static analysis runs to test script

* Clean up
2025-01-10 21:44:05 -05:00

37 lines
795 B
Bash
Executable File

#!/usr/bin/env bash
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "${SCRIPT_DIR}"
find . -type d -mindepth 2 -path "*/dockerfiles/*" | sort --reverse | while read directory; do
printf '=%.0s' {1..80}
echo -e "\nRunning ${directory}"
pushd "${directory}"
bash "1_build.sh"
if [[ $? -ne 0 ]]; then
echo "Error: Build failed for ${directory}"
exit 1
fi
bash "2_start.sh"
if [[ $? -ne 0 ]]; then
echo "Error: Start failed for ${directory}"
exit 1
fi
bash "3_test.sh"
if [[ $? -ne 0 ]]; then
echo "Error: Test failed for ${directory}"
exit 1
fi
bash "4_stop.sh"
if [[ $? -ne 0 ]]; then
echo "Error: Stop failed for ${directory}"
exit 1
fi
popd
done