Matches mammon's pattern more closely and makes PR CI reliable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
37 lines
888 B
YAML
37 lines
888 B
YAML
name: tests
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: docker
|
|
services:
|
|
postgres:
|
|
image: postgres:16
|
|
env:
|
|
POSTGRES_USER: test
|
|
POSTGRES_PASSWORD: test
|
|
POSTGRES_DB: ix_test
|
|
|
|
env:
|
|
IX_POSTGRES_URL: postgresql+asyncpg://test:test@postgres:5432/ix_test
|
|
IX_TEST_MODE: fake
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install system deps for python-magic / PyMuPDF
|
|
run: |
|
|
apt-get update -qq
|
|
apt-get install -y -qq --no-install-recommends libmagic1 libgl1 libglib2.0-0
|
|
|
|
- name: Install uv
|
|
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
|
|
- name: Lint
|
|
run: ~/.local/bin/uv run --extra dev ruff check src tests
|
|
|
|
- name: Unit + integration tests
|
|
run: ~/.local/bin/uv run --extra dev pytest tests/unit tests/integration -v
|