Skip to content

Commit

Permalink
Switch the CI to PostgreSQL
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Jul 4, 2024
1 parent ba46e25 commit 491ba96
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ jobs:
build:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports: ["5432:5432"]
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
Expand All @@ -23,7 +33,7 @@ jobs:
- name: Test with the Django testsuite
env:
ALLOWED_HOSTS: '["*"]'
DATABASE_URL: "sqlite://traduire.db"
DATABASE_URL: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres
DEBUG: "True"
LIVE: "False"
NAMESPACE: "test"
Expand Down
1 change: 0 additions & 1 deletion app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

DATABASES = {"default": django_database_url(env("DATABASE_URL", required=True))}
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

SECRET_KEY = env("SECRET_KEY", required=True)

TIME_ZONE = "Europe/Zurich"
Expand Down

0 comments on commit 491ba96

Please sign in to comment.