File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- name : CI (CPU)
1+ name : CI • macOS
22
33on :
44 push :
@@ -11,17 +11,18 @@ concurrency:
1111 cancel-in-progress : true
1212
1313jobs :
14- cpu :
15- name : CPU • ${{ matrix.os }} • py${{ matrix.python }}
16- runs-on : ${{ matrix.os }}
14+ macos :
15+ name : macOS • py${{ matrix.python }}
16+ runs-on : macos-latest
1717 timeout-minutes : 20
1818 strategy :
1919 fail-fast : false
2020 matrix :
21- os : [ubuntu-latest, windows-latest, macos-latest]
22- python : ['3.12', '3.13']
21+ python : ['3.12']
2322 env :
2423 PYTHONPATH : ${{ github.workspace }}
24+ DEVICE : cpu
25+ APP_RELOAD : " false"
2526
2627 steps :
2728 - uses : actions/checkout@v4
@@ -46,18 +47,12 @@ jobs:
4647 ruff check .
4748 ruff format --check
4849
49- - name : Pytest (CPU only; exclude GPU markers)
50- env :
51- DEVICE : cpu
50+ - name : Pytest (CPU only)
5251 shell : bash
5352 run : |
5453 pytest -q -m "not gpu and not gpu_cuda and not gpu_mps" --maxfail=1
5554
56- - name : Smoke test API (/health) on Ubuntu
57- if : startsWith(matrix.os, 'ubuntu')
58- env :
59- DEVICE : cpu
60- APP_RELOAD : " false"
55+ - name : Smoke test API (/health)
6156 shell : bash
6257 run : |
6358 uvicorn app.main:app --host 127.0.0.1 --port 8000 &
7368 time.sleep(0.5)
7469 sys.exit(1)
7570 PY
76- kill $pid || true
71+ kill $pid || true
Original file line number Diff line number Diff line change 1+ name : CI • Ubuntu
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ workflow_dispatch :
8+
9+ concurrency :
10+ group : ${{ github.workflow }}-${{ github.head_ref || github.ref }}
11+ cancel-in-progress : true
12+
13+ jobs :
14+ ubuntu :
15+ name : Ubuntu • py${{ matrix.python }}
16+ runs-on : ubuntu-latest
17+ timeout-minutes : 20
18+ strategy :
19+ fail-fast : false
20+ matrix :
21+ python : ['3.12']
22+ env :
23+ PYTHONPATH : ${{ github.workspace }}
24+ DEVICE : cpu
25+ APP_RELOAD : " false"
26+
27+ steps :
28+ - uses : actions/checkout@v4
29+
30+ - name : Setup Python
31+ uses : actions/setup-python@v5
32+ with :
33+ python-version : ${{ matrix.python }}
34+ cache : pip
35+
36+ - name : Install deps
37+ shell : bash
38+ run : |
39+ python -m pip install -U pip ruff
40+ pip install -r requirements.txt
41+ if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
42+
43+ - name : Ruff (lint + fmt check)
44+ shell : bash
45+ run : |
46+ ruff --version
47+ ruff check .
48+ ruff format --check
49+
50+ - name : Pytest (CPU only)
51+ shell : bash
52+ run : |
53+ pytest -q -m "not gpu and not gpu_cuda and not gpu_mps" --maxfail=1
54+
55+ - name : Smoke test API (/health)
56+ shell : bash
57+ run : |
58+ uvicorn app.main:app --host 127.0.0.1 --port 8000 &
59+ pid=$!
60+ python - << 'PY'
61+ import time, urllib.request, sys
62+ for _ in range(30):
63+ try:
64+ with urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=1) as r:
65+ print(r.read())
66+ sys.exit(0)
67+ except Exception:
68+ time.sleep(0.5)
69+ sys.exit(1)
70+ PY
71+ kill $pid || true
Original file line number Diff line number Diff line change 1+ name : CI • Windows
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ workflow_dispatch :
8+
9+ concurrency :
10+ group : ${{ github.workflow }}-${{ github.head_ref || github.ref }}
11+ cancel-in-progress : true
12+
13+ jobs :
14+ windows :
15+ name : Windows • py${{ matrix.python }}
16+ runs-on : windows-latest
17+ timeout-minutes : 20
18+ strategy :
19+ fail-fast : false
20+ matrix :
21+ python : ['3.12']
22+ env :
23+ PYTHONPATH : ${{ github.workspace }}
24+ DEVICE : cpu
25+ APP_RELOAD : " false"
26+
27+ steps :
28+ - uses : actions/checkout@v4
29+
30+ - name : Setup Python
31+ uses : actions/setup-python@v5
32+ with :
33+ python-version : ${{ matrix.python }}
34+ cache : pip
35+
36+ - name : Install deps
37+ shell : powershell
38+ run : |
39+ python -m pip install -U pip ruff
40+ pip install -r requirements.txt
41+ if (Test-Path requirements-dev.txt) { pip install -r requirements-dev.txt }
42+
43+ - name : Ruff (lint + fmt check)
44+ shell : powershell
45+ run : |
46+ ruff --version
47+ ruff check .
48+ ruff format --check
49+
50+ - name : Pytest (CPU only)
51+ shell : powershell
52+ run : |
53+ pytest -q -m "not gpu and not gpu_cuda and not gpu_mps" --maxfail=1
54+
55+ - name : Smoke test API (/health)
56+ shell : powershell
57+ run : |
58+ $proc = Start-Process -FilePath uvicorn -ArgumentList "app.main:app --host 127.0.0.1 --port 8000" -PassThru
59+ python - << 'PY'
60+ import time, urllib.request, sys
61+ for _ in range(30):
62+ try:
63+ with urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=1) as r:
64+ print(r.read())
65+ sys.exit(0)
66+ except Exception:
67+ time.sleep(0.5)
68+ sys.exit(1)
69+ PY
70+ if ($proc) { Stop-Process -Id $proc.Id -Force }
You can’t perform that action at this time.
0 commit comments