-
Notifications
You must be signed in to change notification settings - Fork 29
163 lines (153 loc) · 5.74 KB
/
Copy pathci.yml
File metadata and controls
163 lines (153 loc) · 5.74 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
# ================================================================
# Tier 1 — Fast feedback on every push and PR (~30s)
# ================================================================
lint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: python -m pip install -e ".[dev]"
- run: python -m ruff check q2mm/ test/ scripts/
- run: python -m ruff format --check q2mm test scripts examples
# mypy target (python_version=3.12) is set in [tool.mypy]; see the note
# there on why 3.12 rather than the 3.10 runtime floor.
- run: python -m mypy q2mm/
- run: python scripts/check_env_dep_parity.py
test-core:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: python -m pip install -e ".[dev]"
- run: python -m pytest -m "not (openmm or tinker or jax or jax_md or psi4)" -q --cov=q2mm --cov-report=term-missing --cov-report=xml:coverage.xml
- name: Upload coverage
if: matrix.python-version == '3.12'
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage.xml
# ================================================================
# Tier 2 — Backend unit tests on every push (~1-5 min)
# Gated behind Tier 1 so lint/core failures are caught first.
# Each job runs backend-specific unit tests only (no --run-integration).
# Integration/validation/nightly tests are run locally — see bottom.
# Images: ghcr.io/ericchansen/q2mm/ci-<backend>:latest
# ================================================================
test-openmm:
needs: [lint, test-core]
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
container:
image: ghcr.io/ericchansen/q2mm/ci-openmm:latest
options: --user root
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- run: python -m pip install -e . --no-deps && python -m pytest -m "openmm and not cross_backend" -q
test-tinker:
needs: [lint, test-core]
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
container:
image: ghcr.io/ericchansen/q2mm/ci-tinker:latest
options: --user root
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- run: python -m pip install -e . --no-deps && python -m pytest -m "tinker and not cross_backend" -q
test-jax:
needs: [lint, test-core]
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
container:
image: ghcr.io/ericchansen/q2mm/ci-jax:latest
options: --user root
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- run: python -m pip install -e . --no-deps && python -m pytest -m "jax and not cross_backend" -q
test-jax-md:
needs: [lint, test-core]
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
container:
image: ghcr.io/ericchansen/q2mm/ci-jax-md:latest
options: --user root
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- run: python -m pip install -e . --no-deps && python -m pytest -m "jax_md and not cross_backend" -q
test-psi4:
needs: [lint, test-core]
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
container:
image: ghcr.io/ericchansen/q2mm/ci-psi4:latest
options: --user root
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- run: python -m pip install -e . --no-deps && python -m pytest -m psi4 -q
# ================================================================
# Tier 2b — Explicit cross-backend parity surface
# The cross_backend marker owns tests that execute two or more backends.
# --run-integration enables only those explicitly selected parity tests;
# the full integration/validation/nightly tiers remain local-only.
# ================================================================
test-cross-backend:
needs: [lint, test-core]
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
container:
image: ghcr.io/ericchansen/q2mm/ci-full:latest
options: --user root
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- run: python -m pip install -e . --no-deps && python -m pytest --run-integration -m cross_backend -q
# ================================================================
# Validation, nightly, and integration tiers removed from CI.
# These are research workloads (multi-molecule JAX JIT, optimizer
# loops, full eigenmatrix evals) that exceed hosted-runner budgets.
#
# Run locally instead:
# pytest --run-integration -q # Backend integration tests
# pytest --run-validation -q # Seminario parity, published FFs
# pytest --run-nightly -q # Full optimizer loops, benchmarks
# ================================================================