File tree Expand file tree Collapse file tree 4 files changed +73
-12
lines changed
tests_django_project/settings Expand file tree Collapse file tree 4 files changed +73
-12
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+ on :
3+ push :
4+ branches : [main]
5+ pull_request :
6+ branches : [main]
7+
8+ jobs :
9+ pytest :
10+ runs-on : ubuntu-latest
11+ services :
12+ postgres :
13+ image : postgres
14+ env :
15+ POSTGRES_PASSWORD : postgres
16+ options : >-
17+ --health-cmd pg_isready
18+ --health-interval 10s
19+ --health-timeout 5s
20+ --health-retries 5
21+ ports :
22+ - 5432:5432
23+ steps :
24+ - uses : actions/checkout@v6
25+ - uses : astral-sh/setup-uv@v6
26+ - run : uv run pytest
27+ env :
28+ DATABASE_URL : postgres://postgres:postgres@localhost:5432/dreng_tests
29+ POSTGRES_PORT : 5432
30+
31+ mypy :
32+ runs-on : ubuntu-latest
33+ strategy :
34+ fail-fast : false
35+ matrix :
36+ python-version :
37+ - " 3.13"
38+ steps :
39+ - uses : actions/checkout@v6
40+ - uses : astral-sh/setup-uv@v6
41+ with :
42+ python-version : ${{ matrix.python-version }}
43+ - run : uv run mypy
44+
45+ ruff-format :
46+ runs-on : ubuntu-latest
47+ strategy :
48+ fail-fast : false
49+ matrix :
50+ python-version :
51+ - " 3.13"
52+ steps :
53+ - uses : actions/checkout@v6
54+ - uses : astral-sh/setup-uv@v6
55+ with :
56+ python-version : ${{ matrix.python-version }}
57+ - run : uv run ruff format --check
58+
59+ ruff-check :
60+ runs-on : ubuntu-latest
61+ strategy :
62+ fail-fast : false
63+ matrix :
64+ python-version :
65+ - " 3.13"
66+ steps :
67+ - uses : actions/checkout@v6
68+ - uses : astral-sh/setup-uv@v6
69+ with :
70+ python-version : ${{ matrix.python-version }}
71+ - run : uv run ruff check
Original file line number Diff line number Diff line change 33* .egg-info /
44.venv
55. * _cache /
6+ uv.lock
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ warn_unused_ignores = true
5959django_settings_module = " example_django_project.settings"
6060
6161[tool .pytest .ini_options ]
62- addopts = " --ds=' tests_django_project.settings.postgresql' "
62+ DJANGO_SETTINGS_MODULE = " tests_django_project.settings.postgresql"
6363python_files = " tests/*.py"
6464
6565[tool .ruff ]
Original file line number Diff line number Diff line change 8080WSGI_APPLICATION = "tests_django_project.wsgi.application"
8181
8282
83- # Database
84- # https://docs.djangoproject.com/en/5.2/ref/settings/#databases
85-
86- DATABASES = {
87- "default" : {
88- "ENGINE" : "django.db.backends.postgresql" ,
89- "NAME" : "dreng_tests" ,
90- }
91- }
92-
93-
9483# Password validation
9584# https://docs.djangoproject.com/en/5.2/ref/settings/#auth-password-validators
9685
You can’t perform that action at this time.
0 commit comments