Skip to content

chore: remove dead code, add geometry/fchk tests, CI coverage #723

chore: remove dead code, add geometry/fchk tests, CI coverage

chore: remove dead code, add geometry/fchk tests, CI coverage #723

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
- 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 -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 -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: 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 -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 -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 — Cross-backend parity tests (~5-10 min)
# Runs unit tests with every backend available to catch
# cross-backend regressions. Integration tests (--run-integration)
# are too slow for GitHub-hosted runners — run locally instead.
# ================================================================
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 -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
# ================================================================