File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Python application
2
+
3
+ on : [push]
4
+
5
+ jobs :
6
+ build :
7
+
8
+ runs-on : ubuntu-latest
9
+
10
+ services :
11
+ postgres :
12
+ image : postgres:latest
13
+ env :
14
+ POSTGRES_USER : postgres
15
+ POSTGRES_PASSWORD : postgres
16
+ POSTGRES_DB : github_actions
17
+ ports :
18
+ - 5432:5432
19
+ # needed because the postgres container does not provide a healthcheck
20
+ options : --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
21
+
22
+ steps :
23
+ - uses : actions/checkout@v2
24
+ - name : Set up Python 3.9
25
+ uses : actions/setup-python@v2
26
+ with :
27
+ python-version : 3.9
28
+ - name : Install dependencies
29
+ run : |
30
+ python -m pip install --upgrade pip
31
+ pip install -r requirements.txt
32
+ pip install pytest-django
33
+ - name : Run migrations
34
+ run : python manage.py migrate
35
+ - name : Run tests
36
+ run : py.test
You can’t perform that action at this time.
0 commit comments