Skip to content

Commit

Permalink
fix database connection during github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Nistler committed Mar 6, 2024
1 parent 8b74586 commit c6ef8f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ jobs:
image: postgres:16-alpine
# Provide the password for postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
Expand Down
2 changes: 1 addition & 1 deletion example/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
)

# Database
if 'TOX_ENV_NAME' in os.environ:
if os.environ.get('GITHUB_WORKFLOW', False):
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
Expand Down

0 comments on commit c6ef8f8

Please sign in to comment.