forked from okfn-brasil/serenata-de-amor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
44 lines (36 loc) · 1.18 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
35
36
37
38
39
40
41
42
43
44
sudo: false
dist: trusty
language: python
python: 3.6
cache: pip
addons:
postgresql: "9.6"
services:
- postgresql
env:
global:
- AMAZON_BUCKET=serenata-de-amor-data
- AMAZON_REGION=sa-east-1
- DATABASE_URL=postgres://postgres@localhost/jarbas
- CACHE_BACKEND=django.core.cache.backends.dummy.DummyCache
- CC_TEST_REPORTER_ID=351fd43955e403ad2d8ef0c653d4238d1afafdf55396622d3631d3dc1e06d635
install:
- cp contrib/.env.sample .env
- python -m pip install -U pip coverage
- psql -U postgres -c 'create database "jarbas";'
- python -m pip install -r requirements-dev.txt
- python -m pip install -r rosie/requirements.txt
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
- python manage.py migrate
- python manage.py collectstatic --no-input
script:
- coverage run -a manage.py test
- cd rosie
- coverage run -a rosie.py test
- coverage run -a rosie.py run federal_senate
after_success:
- coverage xml
- ./cc-test-reporter after-build --coverage-input-type coverage.py --exit-code $TRAVIS_TEST_RESULT