-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
34 lines (34 loc) · 1.16 KB
/
.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
language: python
sudo: required
dist: trusty
python:
- "2.7"
addons:
postgresql: "9.4"
services:
- postgresql
before_install:
# Remove IPv6 entry via https://github.com/travis-ci/travis-ci/issues/4978
- sudo sed -i '/^::1/d' /etc/hosts && sudo sed -i '/^127.0.1.1/d' /etc/hosts && sudo sed -i '/^fe80::4001:aff:fef0:2b/d' /etc/hosts
- sudo mkdir /etc/dbod
- sudo mkdir /var/log/dbod
- sudo chown travis /var/log/dbod
- sudo cp static/api.cfg /etc/dbod
- cp static/api_missing_section.cfg /tmp/
- cp static/api_missing_option.cfg /tmp/
- wget https://github.com/begriffs/postgrest/releases/download/v0.3.1.1/postgrest-0.3.1.1-ubuntu.tar.xz
- tar xf postgrest-0.3.1.1-ubuntu.tar.xz
install:
- pip install -r requirements.txt
- pip install coveralls
- python setup.py install
before_script:
- psql -c 'CREATE DATABASE dbod;' -U postgres
- psql -d dbod -f dbod/tests/db_test.sql -U postgres
- ./postgrest postgres://postgres@localhost/dbod -a postgres -s api &
- sleep 5
script:
- curl -g http://localhost:3000
- nosetests --with-coverage --cover-package=dbod --cover-html -s
after_success:
coveralls