Skip to content

Commit 809ded1

Browse files
ci: update ci.yml to allow empty tests
1 parent f53457e commit 809ded1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,9 @@ jobs:
9595
9696
- name: Run tests with pytest
9797
# Run pytest with verbose output
98-
# Even without tests, pytest will exit successfully (0 tests collected)
99-
run: pytest -v
98+
# Exit code 5 (no tests collected) is treated as success
99+
run: |
100+
pytest -v || if [ $? -eq 5 ]; then exit 0; else exit $?; fi
100101
101102
# Job 4: Test Suite - Pixi Workflow
102103
# Pixi-based testing for projects using pixi.toml
@@ -131,7 +132,9 @@ jobs:
131132
# py311 = ["py311", "test"]
132133
# [feature.test.tasks]
133134
# test = "pytest -v"
134-
run: pixi run -e ${{ matrix.environment }} test
135+
# Note: Exit code 5 (no tests collected) is treated as success
136+
run: |
137+
pixi run -e ${{ matrix.environment }} test || if [ $? -eq 5 ]; then exit 0; else exit $?; fi
135138
136139
# Job 5: Build Verification
137140
# Ensures the package can be built successfully

0 commit comments

Comments
 (0)