File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ # .github/workflows/django.yml
2
+ name : Django CI
3
+
4
+ on :
5
+ push :
6
+ branches : [main]
7
+ pull_request :
8
+ branches : [main]
9
+
10
+ jobs :
11
+ build :
12
+
13
+ runs-on : ubuntu-latest
14
+
15
+ services :
16
+ postgres :
17
+ image : postgres:12
18
+ env :
19
+ POSTGRES_USER : postgres
20
+ POSTGRES_PASSWORD : postgres
21
+ POSTGRES_DB : django_db
22
+ ports :
23
+ - 5432:5432
24
+ options : >-
25
+ --health-cmd pg_isready
26
+ --health-interval 10s
27
+ --health-timeout 5s
28
+ --health-retries 5
29
+
30
+ steps :
31
+ - name : Checkout code
32
+ uses : actions/checkout@v3
33
+
34
+ - name : Set up Python
35
+ uses : actions/setup-python@v4
36
+ with :
37
+ python-version : ' 3.9'
38
+
39
+ - name : Install dependencies
40
+ run : |
41
+ python -m pip install --upgrade pip
42
+ pip install -r requirements.txt
43
+
44
+ - name : Run Tests
45
+ run : |
46
+ python manage.py test
47
+
You can’t perform that action at this time.
0 commit comments