Skip to content

Commit ba9b81c

Browse files
committed
Fix test
1 parent a1be4da commit ba9b81c

3 files changed

Lines changed: 9 additions & 13 deletions

File tree

.github/workflows/python-publish.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,6 @@ jobs:
5858
- name: Build and install (including C extension)
5959
run: pip install -e . --no-build-isolation
6060

61-
- name: Install optional dependencies (best-effort)
62-
run: |
63-
pip install xgboost || echo "xgboost unavailable for this Python — xgb tests will be skipped"
64-
pip install "torch>=2.0" --index-url https://download.pytorch.org/whl/cpu || echo "torch unavailable for this Python — DL tests will be skipped"
65-
6661
- name: Run test suite (excluding slow/perf)
6762
run: |
6863
pytest \

Dockerfile.test

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1919
gcc g++ make \
2020
&& rm -rf /var/lib/apt/lists/*
2121

22-
# -- Layer 1: dev tools (cached when requirements-dev.txt unchanged)
22+
# -- Layer 1: dev tools + optional deps (torch CPU + xgboost via requirements-dev.txt)
2323
COPY requirements-dev.txt .
2424
RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
2525
pip install --no-cache-dir -r requirements-dev.txt
2626

27-
# -- Layer 2: optional deps (best-effort — same as CI)
28-
RUN pip install --no-cache-dir xgboost \
29-
|| echo "WARNING: xgboost unavailable on this Python — xgb tests will be skipped"
30-
RUN pip install --no-cache-dir "torch>=2.0" \
31-
--index-url https://download.pytorch.org/whl/cpu \
32-
|| echo "WARNING: torch unavailable on this Python — DL tests will be skipped"
33-
3427
# -- Layer 3: package source + C extension
3528
COPY . .
3629
RUN pip install --no-cache-dir -e . --no-build-isolation

requirements-dev.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,11 @@ pytest-cov
33
pytest-html
44
pytest-metadata
55
coverage
6+
7+
# Optional deps required for full test coverage
8+
# XGBoost: ML classifier tests
9+
xgboost
10+
11+
# PyTorch CPU-only wheel (smaller, sufficient for tests)
12+
--extra-index-url https://download.pytorch.org/whl/cpu
13+
torch

0 commit comments

Comments
 (0)