Skip to content

fix pr workflow and readme #9

fix pr workflow and readme

fix pr workflow and readme #9

Workflow file for this run

# .github/workflows/pr.yml
name: PR
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
# Optional (useful to catch issues when someone pushes directly to a branch)
push:
branches-ignore:
- main
concurrency:
group: pr-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
tests:
name: tests (py${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install package + test deps
run: |
set -euxo pipefail
python -m pip install --upgrade pip wheel setuptools
python -m pip install -r docs/requirements.txt
python -m pip install -e .
python -m pytest --version
- name: Run tests
run: |
python -m pytest -q
lint:
name: lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- name: Install lint deps
run: |
python -m pip install --upgrade pip
# If you use pre-commit, this is the cleanest lint gate.
pip install pre-commit
- name: Run pre-commit
run: |
pre-commit run --all-files --show-diff-on-failure