Add document reporting feature with modal UI #586
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Python application | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| - uses: pre-commit/action@v3.0.0 | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| DEBUG: "False" | |
| SECRET_KEY: "github-actions-secret-key" | |
| services: | |
| postgres: | |
| image: postgres | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| unoserver: | |
| image: ghcr.io/dochub-ulb/unoserver:latest | |
| ports: | |
| - 2003:2003 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: "Set up Python" | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: ".python-version" | |
| - name: Apt update | |
| run: sudo apt update | |
| - name: Install apt packages | |
| run: sudo apt install -y graphicsmagick mupdf-tools ghostscript pipx python3-dev | |
| - name: Install unoserver | |
| run: pipx install unoserver --system-site-packages | |
| - name: Install the project | |
| run: uv sync --dev | |
| - name: Django checks | |
| run: uv run ./manage.py check | |
| - name: Check migrations | |
| run: uv run ./manage.py makemigrations --dry-run --check | |
| - name: mypy | |
| run: uv run mypy | |
| - name: Statics checks | |
| run: uv run ./manage.py collectstatic --noinput -v 0 | |
| - name: pytest with SQLite | |
| run: uv run pytest | |
| - name: pytest with PostgreSQL | |
| run: uv run pytest -m postgresql | |
| env: | |
| DB_URL: postgres://postgres:postgres@localhost:5432/postgres | |
| - name: Check local dev initialization scripts | |
| run: make database |