Skip to content

Commit 1790919

Browse files
baijumclaude
andcommitted
fix: use pytest exit code for test detection instead of grep
pytest --collect-only exits 0 when tests exist, 5 when none found. Previous grep-based check matched "test" in "no tests ran" summary. Also revert validate.yml to inline version (reusable workflow needs investigation). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 755ad4c commit 1790919

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
run: |
2020
pip install -r requirements.txt
2121
pip install pytest
22-
if python -m pytest --collect-only -q 2>/dev/null | grep -q "test"; then
22+
if python -m pytest --collect-only -q >/dev/null 2>&1; then
2323
pytest --tb=short
2424
else
2525
echo "No tests found, skipping"

.github/workflows/validate.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,20 @@ on:
66

77
jobs:
88
validate:
9-
uses: towlion/.github/.github/workflows/validate.yml@main
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.12"
16+
17+
- uses: actions/checkout@v4
18+
with:
19+
repository: towlion/platform
20+
path: _platform
21+
continue-on-error: true
22+
23+
- name: Run spec validator
24+
if: success()
25+
run: python _platform/validator/validate.py --tier 2 --dir .

0 commit comments

Comments
 (0)