11# ──────────────────────────────────────────────────────────────
22# f2a CI — Lint, build, test on every push / PR
3- #
4- # IMPORTANT:
5- # - Uses pip exclusively. Do NOT add uv/astral-sh actions.
6- # - maturin builds from source on each platform (no pre-built wheels).
3+ # Based on CocoRoF/googer proven workflow pattern.
74# ──────────────────────────────────────────────────────────────
85name : CI
96
1310 pull_request :
1411 branches : [main]
1512
16- concurrency :
17- group : ci-${{ github.ref }}
18- cancel-in-progress : true
19-
20- permissions :
21- contents : read
22-
23- env :
24- PIP_DISABLE_PIP_VERSION_CHECK : " 1"
25- PYTHONDONTWRITEBYTECODE : " 1"
26-
2713jobs :
28- # ── Rust check & clippy ─ ──────────────────────────────────
29- rust-check :
14+ # ── Lint ( Rust + Python) ──────────────────────────────────
15+ lint :
3016 runs-on : ubuntu-latest
3117 steps :
3218 - uses : actions/checkout@v4
@@ -36,51 +22,20 @@ jobs:
3622 with :
3723 components : clippy, rustfmt
3824
39- - name : Cache cargo
40- uses : actions/cache@v4
41- with :
42- path : |
43- ~/.cargo/bin
44- ~/.cargo/registry/index
45- ~/.cargo/registry/cache
46- ~/.cargo/git/db
47- target
48- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
49- restore-keys : ${{ runner.os }}-cargo-
50-
5125 - name : cargo fmt --check
5226 run : cargo fmt --all -- --check
5327
5428 - name : cargo clippy
5529 run : cargo clippy --all-targets -- -D warnings
5630
57- - name : cargo test
58- run : cargo test --release
59-
60- # ── Python test matrix ────────────────────────────────────
31+ # ── Test (cross-platform × multi-Python) ──────────────────
6132 test :
62- needs : rust-check
33+ needs : lint
6334 strategy :
6435 fail-fast : false
6536 matrix :
66- os : [ubuntu-latest, windows-latest, macos-14 ]
37+ os : [ubuntu-latest, macos-14, windows-latest ]
6738 python-version : ["3.10", "3.11", "3.12", "3.13"]
68- exclude :
69- # Cross-platform spot-check: full Python matrix on Linux only,
70- # 3.12 on Windows/macOS to save CI minutes.
71- - os : windows-latest
72- python-version : " 3.10"
73- - os : windows-latest
74- python-version : " 3.11"
75- - os : windows-latest
76- python-version : " 3.13"
77- - os : macos-14
78- python-version : " 3.10"
79- - os : macos-14
80- python-version : " 3.11"
81- - os : macos-14
82- python-version : " 3.13"
83-
8439 runs-on : ${{ matrix.os }}
8540 steps :
8641 - uses : actions/checkout@v4
@@ -93,28 +48,10 @@ jobs:
9348 with :
9449 python-version : ${{ matrix.python-version }}
9550
96- - name : Cache cargo
97- uses : actions/cache@v4
98- with :
99- path : |
100- ~/.cargo/bin
101- ~/.cargo/registry/index
102- ~/.cargo/registry/cache
103- ~/.cargo/git/db
104- target
105- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
106- restore-keys : ${{ runner.os }}-cargo-
107-
108- - name : Build extension (maturin develop)
109- shell : bash
110- run : |
111- python -m pip install --upgrade pip maturin
112- maturin develop --release
113-
114- - name : Install test dependencies
115- shell : bash
51+ - name : Install package and test deps
11652 run : |
117- python -m pip install pytest pandas numpy matplotlib seaborn scipy pyarrow rich jinja2
53+ python -m pip install --upgrade pip
54+ python -m pip install .[dev]
11855
11956 - name : Run tests
120- run : python -m pytest tests/ -v --tb=short
57+ run : python -m pytest -v --tb=short
0 commit comments