We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f31bf82 commit 0fcbff4Copy full SHA for 0fcbff4
.github/workflows/test.yml
@@ -27,8 +27,23 @@ jobs:
27
pip install -r src/backend/requirements.txt
28
pip install pytest-cov
29
30
+ - name: Check if test files exist
31
+ id: check_tests
32
+ run: |
33
+ if [ -z "$(find src -type f -name 'test_*.py')" ]; then
34
+ echo "No test files found, skipping tests."
35
+ echo "skip_tests=true" >> $GITHUB_ENV
36
+ else
37
+ echo "Test files found, running tests."
38
+ echo "skip_tests=false" >> $GITHUB_ENV
39
+ fi
40
+
41
- name: Run tests with coverage
42
+ if: env.skip_tests == 'false'
43
run: |
44
pytest --cov=. --cov-report=term-missing --cov-report=xml
-
45
46
+ - name: Skip coverage report if no tests
47
+ if: env.skip_tests == 'true'
48
49
+ echo "Skipping coverage report because no tests were found."
0 commit comments