Skip to content

Pytest fixed

Pytest fixed #41

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
smoke-minimal:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
- name: Install minimal (one backend)
run: pip install -e ".[quimb]"
- name: Run headless example
run: python examples/quimb_demo.py mps 2d --save smoke.png --no-show
- name: Verify output
run: python -c "from pathlib import Path; assert Path('smoke.png').exists(), 'smoke.png not created'"
- name: Pytest (partial)
run: pytest
lint-and-test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.10", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install PyTorch (CPU)
run: pip install torch --index-url https://download.pytorch.org/whl/cpu
- name: Install dependencies
run: pip install -e ".[dev]"
- name: Ruff
run: |
ruff check .
ruff format --check .
- name: Pyright
run: pyright
- name: Run headless example
run: python examples/quimb_demo.py mps 2d --save smoke.png --no-show
- name: Pytest
run: pytest