-
Notifications
You must be signed in to change notification settings - Fork 9
50 lines (41 loc) · 1.68 KB
/
lint_test.yml
File metadata and controls
50 lines (41 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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 --cov django/tests/ 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)