-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathproject.travis.yml
45 lines (37 loc) · 1.35 KB
/
project.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
33
34
35
36
37
38
39
40
41
42
43
44
45
language: python
sudo: false
python:
- "3.7"
# Match postgresql version to that in conf/pillar/project.sls
services:
- postgresql
cache:
directories:
- $HOME/.cache/pip
- $HOME/.npm
- $HOME/.nvm
- $HOME/.cache/node_modules
- $HOME/.cache/venvs
env:
- DJANGO_SETTINGS_MODULE="{{ project_name }}.settings.dev"
install:
- pip install -U pip wheel
- pip install -U -r requirements/dev.txt
- nvm install 10.16.0
- nvm use 10.16
- npm install
before_script:
- createdb --encoding=UTF-8 {{ project_name }} --username=postgres --owner=`whoami`
# Uncomment for Requires.IO pushes of develop and master merges (not pull-request builds)
# Requires the $REQUIRES_IO_TOKEN environment variable defined at Travis CI for this project
# See developer documentation section on depdency tracking for more information.
# - if [ "$TRAVIS_PULL_REQUEST" == "false" ] ; then requires.io update-branch -t $REQUIRES_IO_TOKEN -r rescueid -n $(echo $TRAVIS_BRANCH | sed "s|/|__|g") . ; fi
# Uncomment for PostGIS support
# - psql service_info -c "CREATE EXTENSION postgis;" -U postgres
script:
- python manage.py makemigrations --dry-run | grep 'No changes detected' || (echo 'There are changes which require migrations.' && exit 1)
- coverage run manage.py test
- coverage report -m --fail-under 80
- flake8 .
- make docs
- npm test