Skip to content

Commit 63c4207

Browse files
Update ci.yml
1 parent 0f092be commit 63c4207

File tree

1 file changed

+2
-45
lines changed

1 file changed

+2
-45
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -18,48 +18,5 @@ jobs:
1818
python -m pip install --upgrade pip
1919
pip install pytest==8.3.3 z3-solver==4.13.0.0 gradio==4.44.0
2020
21-
- name: Show repo state
22-
run: |
23-
python -V
24-
pip list
25-
echo "root files:"
26-
ls -la
27-
echo "tests dir:"
28-
ls -la tests || true
29-
echo "pytest.ini (may be absent):"
30-
cat pytest.ini || true
31-
32-
- name: Import sanity outside pytest
33-
run: |
34-
python - <<'PY'
35-
print("sanity start")
36-
import gradio_demo as gd
37-
print("audit first line:", gd.audit("penguin on ice").splitlines()[0])
38-
from z3 import Solver, Bool, sat
39-
s = Solver(); x = Bool("x"); s.add(x == True)
40-
print("z3 sat check:", s.check() == sat)
41-
PY
42-
43-
- name: Collect tests verbosely
44-
run: |
45-
set -x
46-
pytest --collect-only -vv tests || true
47-
echo "collect exit code: $?"
48-
49-
- name: Run tests one by one to expose the first failing import
50-
run: |
51-
set -x
52-
for f in tests/*.py; do
53-
echo "==== running $f ===="
54-
pytest -vv "$f" || true
55-
echo "exit code for $f: $?"
56-
done
57-
# force a failure at the end if any test failed
58-
python - <<'PY'
59-
import sys, pathlib, subprocess
60-
failed = False
61-
for p in pathlib.Path("tests").glob("*.py"):
62-
r = subprocess.run(["pytest","-q",str(p)])
63-
failed = failed or r.returncode != 0
64-
sys.exit(1 if failed else 0)
65-
PY
21+
- name: Run tests
22+
run: pytest -ra

0 commit comments

Comments
 (0)