Skip to content

feat(sdk): add publication-first workflows #813

feat(sdk): add publication-first workflows

feat(sdk): add publication-first workflows #813

Workflow file for this run

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
# ================================================================