eksplicit mapping af envs
Some checks failed
Backend CI / test (push) Has been cancelled
Flutter CI / analyze-and-test (push) Has been cancelled

This commit is contained in:
Henrik Jess Nielsen
2026-05-12 18:21:25 +02:00
parent b7a435f8b9
commit 99e9b509a0
67 changed files with 8060 additions and 9 deletions

View File

@@ -0,0 +1,54 @@
name: Backend CI
on:
push:
paths:
- "backend/**"
pull_request:
paths:
- "backend/**"
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
services:
redis:
image: redis:7-alpine
ports: ["6379:6379"]
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: sighej
POSTGRES_USER: sighej
POSTGRES_PASSWORD: sighej
ports: ["5432:5432"]
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: backend/requirements*.txt
- name: Install dependencies
run: pip install -r requirements-dev.txt
- name: Lint (ruff)
run: pip install ruff && ruff check .
- name: Run tests
env:
REDIS_URL: redis://localhost:6379
DATABASE_URL: postgresql+asyncpg://sighej:sighej@localhost:5432/sighej
run: pytest -v