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