Skip to content

rename skip_in_tests to if_redis_present #1327

rename skip_in_tests to if_redis_present

rename skip_in_tests to if_redis_present #1327

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 dev,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 dev,test -E pgsql && poetry run pytest papermerge/
env:
PAPERMERGE__DATABASE__URL: 'postgresql://pmguser:pmgpass@localhost:5432/test_pmgdb'
PAPERMERGE__MAIN__API_PREFIX: ''