Skip to content

Django : la base de tests inclut le schéma de production #1101

Django : la base de tests inclut le schéma de production

Django : la base de tests inclut le schéma de production #1101

Workflow file for this run

name: Lint & Test
on:
push:
branches: [main]
pull_request:
defaults:
run:
working-directory: django
jobs:
all:
runs-on: ubuntu-latest
env:
TEST_PGUSER: postgres
TEST_PGPASSWORD: postgres
TEST_PGPORT: 5431
TEST_PGDATABASE: test_docurba
DJANGO_SETTINGS_MODULE: config.settings.test
SECRET_KEY: test_secret_key
UPSTREAM_NUXT: http://localhost:3000
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v3
with:
version: 2025.11.4 # [default: latest] mise version to install
install: true # [default: true] run `mise install`
cache: true # [default: true] cache mise using GitHub's cache
experimental: true # [default: false] enable experimental features
# automatically write this mise.toml file
working_directory: ..
- name: 🛠️ Initialize the test database
run: mise start:tests
- uses: actions/setup-python@v5
with:
python-version-file: django/.python-version
- uses: astral-sh/setup-uv@v6
with:
activate-environment: true
- run: uv sync --locked --all-extras --dev --active
- run: pytest
- run: ruff format --diff .
- run: ruff check --output-format=github .
- run: python -m django makemigrations --check --dry-run --noinput || (echo "⚠ Migration manquante ⚠"; exit 1)