File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 \
Original file line number Diff line number Diff 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)
2323COPY requirements-dev.txt .
2424RUN 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
3528COPY . .
3629RUN pip install --no-cache-dir -e . --no-build-isolation
Original file line number Diff line number Diff line change @@ -3,3 +3,11 @@ pytest-cov
33pytest-html
44pytest-metadata
55coverage
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
You can’t perform that action at this time.
0 commit comments