From cb68589e0d4af6e3f7360f2da5abfac2e16c35c9 Mon Sep 17 00:00:00 2001 From: dmotte <37443982+dmotte@users.noreply.github.com> Date: Fri, 15 Dec 2023 00:21:51 +0100 Subject: [PATCH] Check for tests to run in python-pkg.sh --- scripts/cicd/python-pkg.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/cicd/python-pkg.sh b/scripts/cicd/python-pkg.sh index b4317a3..d7cbb27 100644 --- a/scripts/cicd/python-pkg.sh +++ b/scripts/cicd/python-pkg.sh @@ -55,7 +55,11 @@ echo "::group::$0: Format (autopep8)" echo '::endgroup::' echo "::group::$0: Unit tests (pytest)" - venv/bin/python3 -m pytest . + if [ -e test ]; then + venv/bin/python3 -m pytest test + else + echo 'No tests to run' + fi echo '::endgroup::' echo "::group::$0: Set the right version"