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 : CI
2+
3+ # TODO: See if we want to limit this scope to specified repos/forks
4+ on : [push, pull_request]
5+
6+ jobs :
7+ build :
8+ runs-on : ubuntu-latest
9+
10+ services :
11+ postgres :
12+ # Docker hub postgres image
13+ image : postgres
14+ # Postgres env vars
15+ env :
16+ POSTGRES_USER : postgres
17+ POSTGRES_PASSWORD : postgres
18+ POSTGRES_DB : test_jsonate
19+ # map port on service container to port on docker host
20+ ports :
21+ - 5432:5432
22+ # Set health checks to wait until postgres has started
23+ options : >-
24+ --health-cmd pg_isready
25+ --health-interval 10s
26+ --health-timeout 5s
27+ --health-retries 5
28+
29+ steps :
30+ - uses : actions/checkout@v2
31+
32+ - name : Set up Python
33+ uses : actions/setup-python@v2
34+ with :
35+ python-version : 3.8
36+
37+ - name : psycopg2 prerequisites
38+ run : sudo apt-get install libpq-dev
39+
40+ - name : install python dependencies
41+ run : |
42+ python -m pip install --upgrade pip
43+ pip install -r requirements.txt
44+
45+ - name : execute tests
46+ run : |
47+ python test_project/manage.py makemigrations --dry-run --check
48+ python test_project/manage.py test test_app
Original file line number Diff line number Diff line change 66/jsonate.egg-info /
77/dist /
88.idea
9- build
9+ build
10+ * ~
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1717 }
1818}
1919
20+ if os .environ .get ('GITHUB_WORKFLOW' ):
21+ DATABASES = {
22+ 'default' : {
23+ 'ENGINE' : 'django.db.backends.postgresql' ,
24+ 'NAME' : 'test_jsonate' ,
25+ 'USER' : 'postgres' ,
26+ 'PASSWORD' : 'postgres' ,
27+ 'HOST' : '127.0.0.1' ,
28+ 'PORT' : '5432' ,
29+ }
30+ }
31+
2032MEDIA_ROOT = os .path .join (PROJECT_ROOT , 'media' )
2133MEDIA_URL = '/media/'
2234
You can’t perform that action at this time.
0 commit comments