-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
62 lines (48 loc) · 1.31 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
56
57
58
59
60
61
62
---
language: python
sudo: required
dist: trusty
python:
- '3.5'
node_js:
- '8.12.0'
# One line per build
env:
- DJANGO_CONFIGURATION="Test" DJANGO_TEST_WITH_WEB="y" DJANGO_TEST_WITH_ES="y"
services:
- redis-server
- elasticsearch
# Run Django test sqlite db
# Prepare (install npm + pip dependencies, collect statics, locale)
install:
# OS dependencies
- sudo apt-get update -qy
- sudo apt-get install -y python-dev gettext pandoc binutils libproj-dev gdal-bin
# Python dependencies
- pip install -r requirements/dev.txt
# Frontend dependencies
- npm install
- npm run-script build
# Install NLTK models (cannot be done by requirements.txt)
- python -m nltk.downloader punkt
# Prepare django
- python manage.py collectstatic --no-input
- python manage.py compilemessages --l de --l en
# Elasticsearch needs few seconds to start
before_script:
- sleep 10
# Start tests
script:
- coverage run --branch manage.py test
- coverage report
# Generate test coverage
after_success:
- coveralls
# Deploy to staging (currently not working due to pandoc heroku bug)
#deploy:
# provider: heroku
# api_key: $HEROKU_STAGING_API_KEY
# app: $HEROKU_STAGING_APP_NAME
# run:
# - "python manage.py collectstatic --no-input"
# - "python manage.py compilemessages --l de --l en"