| 1 |
name: integration-slow |
| 2 |
|
| 3 |
# Weekly gate for slow integration tests: real training, export, ollama |
| 4 |
# round trip, pack / unpack / prompt identity. Not run per-PR because |
| 5 |
# the end-to-end path is ~15-20 min on ubuntu-latest; opt in by labeling |
| 6 |
# a PR with `slow-run-please`. |
| 7 |
# |
| 8 |
# Sprint 14.5 owns this workflow. The bodies live under tests/integration/ |
| 9 |
# and skip gracefully when `ollama` / `vendor/llama.cpp` / tiny-model |
| 10 |
# cache aren't present, so the job is also safe to dispatch manually |
| 11 |
# from the Actions tab. |
| 12 |
|
| 13 |
on: |
| 14 |
schedule: |
| 15 |
# Sundays at 07:00 UTC — offset from the template-drift workflow at |
| 16 |
# 06:00 UTC so the two jobs don't contend for runner capacity. |
| 17 |
- cron: "0 7 * * 0" |
| 18 |
workflow_dispatch: {} |
| 19 |
pull_request: |
| 20 |
types: [labeled, synchronize] |
| 21 |
|
| 22 |
concurrency: |
| 23 |
group: integration-slow-${{ github.ref }} |
| 24 |
cancel-in-progress: false |
| 25 |
|
| 26 |
env: |
| 27 |
UV_VERSION: "0.11.6" |
| 28 |
PYTHON_VERSION: "3.11" |
| 29 |
# Same SHA as ci.yml / weekly-template-drift.yml — keep in sync. |
| 30 |
TINY_MODEL_REVISION: "12fd25f77366fa6b3b4b768ec3050bf629380bac" |
| 31 |
|
| 32 |
jobs: |
| 33 |
slow: |
| 34 |
name: slow integration suite |
| 35 |
# On pull_request runs, only fire when the `slow-run-please` label is present. |
| 36 |
# Scheduled / manual dispatch always run. |
| 37 |
if: >- |
| 38 |
github.event_name != 'pull_request' |
| 39 |
|| contains(github.event.pull_request.labels.*.name, 'slow-run-please') |
| 40 |
runs-on: ubuntu-latest |
| 41 |
timeout-minutes: 45 |
| 42 |
steps: |
| 43 |
- name: Checkout with submodules |
| 44 |
uses: actions/checkout@v4 |
| 45 |
with: |
| 46 |
submodules: recursive |
| 47 |
|
| 48 |
- name: Install uv |
| 49 |
uses: astral-sh/setup-uv@v4 |
| 50 |
with: |
| 51 |
version: ${{ env.UV_VERSION }} |
| 52 |
|
| 53 |
- name: Sync dependencies |
| 54 |
run: uv sync --all-extras --dev |
| 55 |
|
| 56 |
- name: Restore HF cache |
| 57 |
id: hf-cache |
| 58 |
uses: actions/cache@v4 |
| 59 |
with: |
| 60 |
path: ${{ github.workspace }}/.hf-cache |
| 61 |
key: hf-tiny-${{ env.TINY_MODEL_REVISION }}-${{ hashFiles('pyproject.toml') }} |
| 62 |
restore-keys: | |
| 63 |
hf-tiny-${{ env.TINY_MODEL_REVISION }}- |
| 64 |
|
| 65 |
- name: Pre-warm tiny model |
| 66 |
env: |
| 67 |
HF_HOME: ${{ github.workspace }}/.hf-cache |
| 68 |
DLM_TINY_MODEL_REVISION: ${{ env.TINY_MODEL_REVISION }} |
| 69 |
run: | |
| 70 |
uv run python - <<'PY' |
| 71 |
from tests.fixtures.tiny_model import tiny_model_path |
| 72 |
print("tiny model at:", tiny_model_path()) |
| 73 |
PY |
| 74 |
|
| 75 |
- name: Restore llama.cpp build cache |
| 76 |
id: llama-cpp-cache |
| 77 |
uses: actions/cache@v4 |
| 78 |
with: |
| 79 |
path: vendor/llama.cpp/build |
| 80 |
key: llama-cpp-build-${{ hashFiles('.gitmodules', 'vendor/llama.cpp/VERSION') }} |
| 81 |
|
| 82 |
- name: Build llama-quantize + llama-imatrix (if not cached) |
| 83 |
if: steps.llama-cpp-cache.outputs.cache-hit != 'true' |
| 84 |
run: | |
| 85 |
set -euxo pipefail |
| 86 |
command -v cmake >/dev/null 2>&1 || sudo apt-get install -y cmake |
| 87 |
scripts/bump-llama-cpp.sh build |
| 88 |
|
| 89 |
- name: Install Ollama |
| 90 |
run: | |
| 91 |
set -euxo pipefail |
| 92 |
curl -fsSL https://ollama.com/install.sh | sh |
| 93 |
# The ollama_daemon fixture starts its own `ollama serve` when |
| 94 |
# nothing is listening — we don't need to launch one here. |
| 95 |
ollama --version |
| 96 |
|
| 97 |
- name: Run slow integration suite |
| 98 |
env: |
| 99 |
HF_HOME: ${{ github.workspace }}/.hf-cache |
| 100 |
DLM_TINY_MODEL_REVISION: ${{ env.TINY_MODEL_REVISION }} |
| 101 |
run: uv run pytest -m slow -v |
| 102 |
|