Skip to content

add unique constraint to document type (#556) #1378

add unique constraint to document type (#556)

add unique constraint to document type (#556) #1378

Workflow file for this run

name: Tests
on:
workflow_dispatch:
push:
paths:
- 'papermerge/**'
- 'tests/**'
- 'ui/**'
- 'pyproject.toml'
- '.github/workflows/tests.yml'
jobs:
tests_with_sqlite:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v4
with:
python-version: '3.13'
- name: Install required debian packages
run: sudo apt-get install -y poppler-utils # required by pdf2image
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install poetry==1.8
poetry install --with test && poetry run pytest papermerge/
env:
PAPERMERGE__DATABASE__URL: 'sqlite:///test.sqlite'
PAPERMERGE__MAIN__API_PREFIX: ''
tests_with_postgres:
runs-on: ubuntu-22.04
services:
postgres:
image: postgres:16.1
env:
POSTGRES_PASSWORD: pmgpass
POSTGRES_USER: pmguser
POSTGRES_DB: test_pmgdb
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v4
with:
python-version: '3.13'
- name: Install required debian packages
run: sudo apt-get install -y poppler-utils # required by pdf2image
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install poetry==1.8
poetry install --with test -E pg && poetry run pytest papermerge/
env:
PAPERMERGE__DATABASE__URL: 'postgresql://pmguser:pmgpass@localhost:5432/test_pmgdb'
PAPERMERGE__MAIN__API_PREFIX: ''