-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
55 lines (55 loc) · 1.56 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
45
46
47
48
49
50
51
52
53
54
55
dist: trusty
sudo: required
language: python
python:
- "3.4"
- "3.5"
- "3.6"
cache:
directories:
- ngApp/node_modules
- $HOME/.nvm/versions/node/v7.4.0/lib/node_modules
- $HOME/.cache/pip
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log
services:
postgresql
addons:
postgresql: "9.4"
apt:
sources:
- sourceline: deb http://deb.nodesource.com/node_6.x trusty main
- key_url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
packages:
- nodejs
- chromium-browser
- chromium-chromedriver
env:
global:
- DJANGO_SETTINGS_MODULE="accountant.settings.ci"
matrix:
- REVERSE=
- REVERSE=--reverse
install:
- pip install -r requirements/ci.txt
- npm install -g @angular/[email protected]
- cd ngApp; npm install; cd ..
before_script:
- "export PATH=$PATH:/usr/lib/chromium-browser"
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3
- psql -c "CREATE DATABASE accountant_ci" -U postgres
script:
- ./build-ng-app.sh -prod
- cd accountant
- coverage run -p manage.py test core $REVERSE -v2
- coverage run -p manage.py test interface $REVERSE -v2
- coverage run -p manage.py test functional_tests $REVERSE -v2
- coverage combine
- flake8
- cd ../ngApp; ng test --single-run --browser Chromium --code-coverage
after_success:
- bash <(curl -s https://codecov.io/bash) -cF angular
- cd ../accountant
- bash <(curl -s https://codecov.io/bash) -cF python