Skip to content

Commit 4eac5f7

Browse files
committed
ci: skip unit test step when tests directory is intentionally absent
1 parent 8ff358c commit 4eac5f7

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/ci-cd.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ jobs:
3030
pip install -r requirements.txt
3131
3232
- name: Run unit tests
33-
run: python -m unittest discover -s tests -p "test_*.py" -v
33+
run: |
34+
if [ -d tests ] && ls tests/test_*.py >/dev/null 2>&1; then
35+
python -m unittest discover -s tests -p "test_*.py" -v
36+
else
37+
echo "No repository tests found; skipping unit tests."
38+
fi
3439
3540
docker:
3641
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)