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+ name : Django CI
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+ pull_request :
7+ branches : [ "main" ]
8+
9+ jobs :
10+ test :
11+ runs-on : ubuntu-latest
12+
13+ services :
14+ postgres :
15+ image : postgres:13
16+ env :
17+ POSTGRES_USER : postgres
18+ POSTGRES_PASSWORD : postgres
19+ POSTGRES_DB : mydb
20+ ports :
21+ - 5432:5432
22+ options : >-
23+ --health-cmd="pg_isready -U postgres"
24+ --health-interval=10s
25+ --health-timeout=5s
26+ --health-retries=5
27+
28+ env :
29+ DATABASE_URL : postgres://postgres:postgres@localhost:5432/mydb
30+
31+ steps :
32+ - uses : actions/checkout@v3
33+
34+ - name : Set up Python
35+ uses : actions/setup-python@v4
36+ with :
37+ python-version : [3.11, 3.12]
38+
39+ - name : Install dependencies
40+ run : |
41+ python -m pip install --upgrade pip
42+ pip install -r requirements.txt
43+
44+ - name : Run migrations
45+ run : python manage.py migrate
46+
47+ - name : Run Booking Test
48+ run : python manage.py test bookings
You can’t perform that action at this time.
0 commit comments