diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a3bd2ff --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,22 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + cache: pip + # CPU-only torch first, so sentence-transformers does not pull the CUDA wheels. + - run: pip install torch --index-url https://download.pytorch.org/whl/cpu + - run: pip install -e ".[dev]" + - run: ruff check . + - run: ruff format --check . + - run: pytest -q diff --git a/DECISIONS.md b/DECISIONS.md index 7c60dfe..5dfd3d5 100644 --- a/DECISIONS.md +++ b/DECISIONS.md @@ -451,3 +451,14 @@ page. What follows is what that left open. `TestEdit::test_updates_the_citation` failed. Found while running the suite for this feature; fixed in its own commit. + +## Continuous integration + +- **One GitHub Actions job: `ruff check`, `ruff format --check`, `pytest`**, on + pushes to `main` and on every pull request. The suite stubs the embedder and + generates its own PDFs, so the job downloads no models and needs no secrets. +- **CI runs Python 3.11, the supported floor.** The development venv is 3.12, + so the floor is the version nothing else exercises. +- **CPU-only `torch` is installed before the package.** On Linux the default + wheel bundles CUDA libraries the tests never use; the CPU index keeps the + install small.