Files
WGDashboard-PRW/.github/workflows/backend.yml
T
2026-10-29 14:48:36 +01:00

39 lines
1.1 KiB
YAML

name: Backend checks
on:
push:
pull_request:
jobs:
python:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: wgdashboard
POSTGRES_PASSWORD: wgdashboard
POSTGRES_DB: wgdashboard
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U wgdashboard -d wgdashboard"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: pip
cache-dependency-path: src/requirements.txt
- run: python -m venv .venv
- run: .venv/bin/python -m pip install -r src/requirements.txt pytest pyright ruff
- run: .venv/bin/ruff check
- run: .venv/bin/pyright
- run: .venv/bin/pytest
- run: .venv/bin/alembic upgrade head
env:
WGDASHBOARD_DATABASE_URL: postgresql+psycopg://wgdashboard:wgdashboard@localhost:5432/wgdashboard