Skip to content

Commit 82f7980

Browse files
committed
allow workflow to skip some tests
Signed-off-by: exploreriii <[email protected]>
1 parent 5256bd9 commit 82f7980

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/test_naming.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ jobs:
2828
- name: Validate test file naming convention
2929
run: |
3030
echo "Checking for test files that don't end with _test.py..."
31-
invalid_tests=$(
32-
find tests -type f -name "*.py" \
33-
! -name "*_test.py" || true
34-
)
35-
31+
invalid_tests=$(find tests -type f -name "*.py" \
32+
! -name "*_test.py" \
33+
! -path "tests/integration/__init__.py" \
34+
! -path "tests/unit/conftest.py" \
35+
! -path "tests/unit/mock_server.py" \
36+
! -path "tests/unit/__init__.py" \
37+
! -path "tests/__init__.py" \
38+
|| true)
3639
if [ -n "$invalid_tests" ]; then
3740
echo "The following test files don't follow (*_test.py):"
3841
echo "$invalid_tests"

0 commit comments

Comments
 (0)