Skip to content

chore: Lint

chore: Lint #87

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Ruff check
run: ruff check .
- name: Ruff format check
run: ruff format --check .
- name: Type check
run: mypy src/paradedb
test:
name: Unit Tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.13"]
django-version: ["6.0"]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "Django~=${{ matrix.django-version }}.0"
pip install -e ".[dev]"
- name: Run unit tests
run: pytest -m "not integration"
integration:
name: Integration Tests
runs-on: ubuntu-latest
needs: test
services:
paradedb:
image: paradedb/paradedb:0.21.4-pg18
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres -d postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 12
env:
PARADEDB_INTEGRATION: "1"
PARADEDB_TEST_DSN: postgresql://postgres@localhost:5432/postgres
PGPASSWORD: postgres
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run integration tests
run: pytest -m integration --cov=paradedb --cov-report=xml
- name: Upload to Codecov
uses: codecov/codecov-action@v5
with:
files: ./coverage.xml
flags: django-paradedb
fail_ci_if_error: false
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Install example dependencies
run: pip install -r examples/requirements.txt
- name: Run examples
env:
DATABASE_URL: ${{ env.PARADEDB_TEST_DSN }}
run: |
python examples/quickstart/quickstart.py
python examples/autocomplete/setup.py
python examples/autocomplete/autocomplete.py
python examples/more_like_this/more_like_this.py
python examples/faceted_search/faceted_search.py
python examples/hybrid_rrf/setup.py
python examples/hybrid_rrf/hybrid_rrf.py