Skip to content

Docker compose

Docker compose #1112

Workflow file for this run

name: Lint & Test
on:
push:
branches: [main]
pull_request:
jobs:
all:
runs-on: ubuntu-latest
env:
PYTHONPATH: ${{ github.workspace }}/django/
DJANGO_SETTINGS_MODULE: config.settings.test
TEST_PGUSER: postgres
TEST_PGPASSWORD: postgres
TEST_PGPORT: 5431
TEST_PGDATABASE: test_docurba
SECRET_KEY: test_secret_key
UPSTREAM_NUXT: http://localhost:3000
steps:
- name: Set DATABASE_URL
run: |
echo "TEST_DATABASE_URL=postgres://${TEST_PGUSER}:${TEST_PGPASSWORD}@127.0.0.1:${TEST_PGPORT}/${TEST_PGDATABASE}" >> $GITHUB_ENV
- uses: actions/checkout@v4 # TODO use sha
- uses: actions/setup-python@v5 # TODO usa sha
with:
python-version-file: django/.python-version
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
activate-environment: true
- run: uv sync --locked --all-extras --dev --active --project=django/
- uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1
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
- name: 🛠️ Initialize the test database
run: mise start:tests
- run: pytest django/tests/
- run: ruff format --diff django/
- run: ruff check --output-format=github django/
- run: django-admin makemigrations --check --dry-run --noinput || (echo "⚠ Migration manquante ⚠"; exit 1)