|
1 | | -name: pipeline |
| 1 | +name: smoke |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | 5 | pull_request: |
6 | 6 |
|
| 7 | +# Cancel superseded runs on the same ref. |
| 8 | +concurrency: |
| 9 | + group: smoke-${{ github.ref }} |
| 10 | + cancel-in-progress: true |
| 11 | + |
7 | 12 | jobs: |
8 | | - run-pipeline: |
| 13 | + smoke: |
| 14 | + name: smoke (Python ${{ matrix.python-version }}) |
9 | 15 | runs-on: ubuntu-latest |
| 16 | + strategy: |
| 17 | + fail-fast: false |
| 18 | + matrix: |
| 19 | + python-version: ["3.11", "3.12"] |
| 20 | + |
10 | 21 | steps: |
11 | 22 | - uses: actions/checkout@v4 |
12 | | - - uses: actions/setup-python@v5 |
| 23 | + |
| 24 | + - name: Install uv |
| 25 | + uses: astral-sh/setup-uv@v3 |
13 | 26 | with: |
14 | | - python-version: "3.11" |
| 27 | + enable-cache: true |
| 28 | + |
| 29 | + - name: Set up Python ${{ matrix.python-version }} |
| 30 | + run: uv python install ${{ matrix.python-version }} |
| 31 | + |
15 | 32 | - name: Install dependencies |
| 33 | + run: uv sync --python ${{ matrix.python-version }} |
| 34 | + |
| 35 | + - name: Import smoke check |
| 36 | + # Catches syntax errors, broken imports, and dependency drift — |
| 37 | + # the things that *can* break in the absence of UKHLS data. |
16 | 38 | run: | |
17 | | - python -m pip install --upgrade pip |
18 | | - pip install . |
19 | | - - name: Run pipeline |
20 | | - run: | |
21 | | - FAST=1 python -m src.cli --config configs/config.yaml --fast |
| 39 | + uv run python -c " |
| 40 | + from src import cli |
| 41 | + from src.pipeline import ingest, ingest_ukhls, cluster, estimate, report |
| 42 | + from src.analysis import figures, tables |
| 43 | + from src.analysis._style import apply_paper_style, PALETTE, TYPE_STYLES |
| 44 | + print('imports ok') |
| 45 | + " |
| 46 | +
|
22 | 47 | - name: Run tests |
23 | | - run: | |
24 | | - pytest -q |
25 | | - - name: Upload outputs |
26 | | - uses: actions/upload-artifact@v4 |
27 | | - with: |
28 | | - name: pipeline-output |
29 | | - path: output/ |
| 48 | + # `tests/test_pipeline.py` skips automatically when the UKHLS frailty |
| 49 | + # parquet is absent (which it always is in CI — the data is restricted |
| 50 | + # and gitignored). What this step does verify: that pytest collection |
| 51 | + # succeeds, that the test code itself parses, and that no other tests |
| 52 | + # have regressed. |
| 53 | + run: uv run pytest -q |
0 commit comments