-
Notifications
You must be signed in to change notification settings - Fork 20
/
.travis.yml
32 lines (32 loc) · 907 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
language: python
python:
- "3.6"
addons:
postgresql: "9.6"
dist: trusty
before_script:
- cp .env.example .env
- cp ui/src/config/index.js.example ui/src/config/index.js
- psql -c "CREATE DATABASE wocdb;" -U postgres
- psql -c "CREATE USER wocuser WITH LOGIN PASSWORD 'password';" -U postgres
- psql -c "ALTER ROLE wocuser WITH CREATEDB;" -U postgres
- psql -c "GRANT ALL PRIVILEGES ON DATABASE wocdb TO wocuser;" -U postgres
before_install:
- export DJANGO_SETTINGS_MODULE=woc.settings
install:
- pip3 install coveralls
- pip3 install pipenv
- pipenv install --dev
script:
- cd src
- source "$(pipenv --venv)"/bin/activate
- flake8 .
- python manage.py makemigrations
- python manage.py migrate
- cd ../ui
- npm install
- npm run build
- cd ../src
- coverage run --omit='*/virtualenvs/*,*/virtualenv/*,manage.py,woc/*' manage.py test
after_success:
- coveralls