File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 1616
1717 test :
1818 runs-on : ubuntu-latest
19+ services :
20+ postgres :
21+ image : postgres
22+ env :
23+ POSTGRES_DB : dbtasks
24+ POSTGRES_PASSWORD : secret
25+ options : >-
26+ --health-cmd pg_isready
27+ --health-interval 10s
28+ --health-timeout 5s
29+ --health-retries 5
30+ ports :
31+ - 5432:5432
1932 strategy :
2033 matrix :
2134 django-version : ["6.0"]
3043 uses : astral-sh/setup-uv@v7
3144 - name : Run Tests (SQLite)
3245 run : uv run --with "django~=${{ matrix.django-version }}" manage.py test
46+ - name : Run Tests (PostgreSQL)
47+ run : uv run --with "django~=${{ matrix.django-version }}" manage.py test
48+ env :
49+ TEST_ENGINE : postgres
50+ POSTGRES_PASSWORD : secret
Original file line number Diff line number Diff line change 77 DATABASES = {
88 "default" : {
99 "ENGINE" : "django.db.backends.postgresql" ,
10- "NAME" : "dbtasks" ,
10+ "NAME" : os .getenv ("POSTGRES_DB" , "dbtasks" ),
11+ "USER" : os .getenv ("POSTGRES_USER" , "postgres" ),
12+ "PASSWORD" : os .getenv ("POSTGRES_PASSWORD" , "" ),
13+ "HOST" : os .getenv ("POSTGRES_HOST" , "localhost" ),
14+ "PORT" : os .getenv ("POSTGRES_PORT" , 5432 ),
1115 }
1216 }
1317else :
You can’t perform that action at this time.
0 commit comments