File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Database
2+ DATABASE_URI = postgresql://postgres:postgres@localhost:5432/web
3+ DATABASE_URI_TEST = postgresql://postgres:postgres@localhost:5432/web_test
4+
5+ # Django
6+ SECRET_KEY = ci-secret-key
7+ DEBUG = False
8+ ALLOWED_HOSTS = localhost,127.0.0.1
9+ CORS_ALLOWED_ORIGINS = http://localhost:3000,http://127.0.0.1:3000
10+
11+ # Celery / Redis
12+ CELERY_BROKER_URL = redis://localhost:6379/0
13+ CELERY_RESULT_BACKEND = redis://localhost:6379/1
14+
15+ # Postgres
16+ POSTGRES_USER = postgres
17+ POSTGRES_PASSWORD = postgres
18+ POSTGRES_DB = postgres
Original file line number Diff line number Diff line change 1+ jobs :
2+ test :
3+ runs-on : ubuntu-latest
4+ services :
5+ postgres :
6+ image : postgres:15
7+ env :
8+ POSTGRES_USER : postgres
9+ POSTGRES_PASSWORD : postgres
10+ POSTGRES_DB : web_test
11+ ports : ["5432:5432"]
12+ options : >-
13+ --health-cmd="pg_isready -U postgres"
14+ --health-interval=10s
15+ --health-timeout=5s
16+ --health-retries=5
17+
18+ redis :
19+ image : redis:7
20+ ports : ["6379:6379"]
21+
22+ steps :
23+ - uses : actions/checkout@v4
24+
25+ - name : Set up Python
26+ uses : actions/setup-python@v5
27+ with :
28+ python-version : " 3.11"
29+
30+ - name : Install dependencies
31+ run : |
32+ pip install -r requirements.txt
33+
34+ - name : Load CI environment variables
35+ run : |
36+ set -o allexport
37+ source .env.ci
38+ set +o allexport
39+
40+ - name : Run migrations
41+ run : python manage.py migrate
42+
43+ - name : Run tests
44+ run : pytest
You can’t perform that action at this time.
0 commit comments