Skip to content

Updates continued

Updates continued #76

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
# ── Linux: full suite including PySCF-dependent tests ─────────────────────
test-linux:
name: Tests (ubuntu-latest, Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install package and dev dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[pyscf,ase,dev]"
- name: Run tests (skip network tests)
run: |
pytest -m "not network" \
--cov=quantui \
--cov-report=term-missing \
--cov-report=xml \
--no-header -q
- name: Upload coverage to Codecov
if: matrix.python-version == '3.11'
uses: codecov/codecov-action@v4
with:
files: coverage.xml
fail_ci_if_error: false
# ── Windows: non-PySCF tests only (PySCF requires Linux/WSL) ──────────────
test-windows:
name: Tests (windows-latest, Python 3.11)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- name: Install package and dev dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[ase,dev]"
- name: Run non-PySCF tests
# PySCF tests are skipped automatically via skipif guards when pyscf
# is not installed. network tests also skipped.
# Single line: PowerShell does not support backslash line continuation.
run: pytest -m "not network" --ignore=tests/test_session_calc.py --ignore=tests/test_optimizer.py --ignore=tests/test_preopt.py --no-cov --no-header -q
# ── Lint / type-check ─────────────────────────────────────────────────────
lint:
name: Lint & type check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- name: Install pre-commit
run: |
python -m pip install --upgrade pip
pip install pre-commit
- name: Run pre-commit (black + ruff + mypy)
run: pre-commit run --all-files