Treat empty unittest discovery as release skip
All checks were successful
Dependency Audit / dependency-audit (push) Successful in 1m28s
All checks were successful
Dependency Audit / dependency-audit (push) Successful in 1m28s
This commit is contained in:
@@ -44,11 +44,20 @@ run_step() {
|
|||||||
|
|
||||||
run_discovered_tests() {
|
run_discovered_tests() {
|
||||||
local suite_dir="$1"
|
local suite_dir="$1"
|
||||||
|
local status
|
||||||
if ! find "$suite_dir" -type f -name 'test*.py' -print -quit | grep -q .; then
|
if ! find "$suite_dir" -type f -name 'test*.py' -print -quit | grep -q .; then
|
||||||
echo "No unittest test files found under $suite_dir; skipping."
|
echo "No unittest test files found under $suite_dir; skipping."
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
set +e
|
||||||
"$PYTHON" -m unittest discover -s "$suite_dir"
|
"$PYTHON" -m unittest discover -s "$suite_dir"
|
||||||
|
status=$?
|
||||||
|
set -e
|
||||||
|
if [[ "$status" == 5 ]]; then
|
||||||
|
echo "No unittest tests discovered under $suite_dir; skipping."
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
return "$status"
|
||||||
}
|
}
|
||||||
|
|
||||||
run_step "Validate release refs and installed package metadata"
|
run_step "Validate release refs and installed package metadata"
|
||||||
|
|||||||
Reference in New Issue
Block a user