-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy path.travis.yml
63 lines (60 loc) · 2.01 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
63
jobs:
include:
- language: python
python: 3.7
name: Project linting & migrations
services:
- redis-server
env: DB=sqlite
cache:
pip: true
install:
- pip install -U importlib_metadata
- pip install -r requirements/travis.txt
- nvm install 12
script:
# Python code linting
- make lint-python
# Migrate and initdb
- python manage.py migrate --noinput --traceback
- python manage.py initdb --no-projects
- python manage.py makemigrations --noinput --check
# Other tasks
- python manage.py build_assets
- python setup.py sdist
- make docs
- language: python
python: 3.7
services:
- mysql
- redis-server
env: DB=mysql
cache:
pip: true
before_install:
- curl -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.1-amd64.deb
- sudo dpkg -i --force-confnew elasticsearch-7.5.1-amd64.deb
- sudo sed -i.old 's/-Xms1g/-Xms128m/' /etc/elasticsearch/jvm.options
- sudo sed -i.old 's/-Xmx1g/-Xmx128m/' /etc/elasticsearch/jvm.options
- echo -e '-XX:+DisableExplicitGC\n-Djdk.io.permissionsUseCanonicalPath=true\n-Dlog4j.skipJansi=true\n-server\n' | sudo tee -a /etc/elasticsearch/jvm.options
- sudo chown -R elasticsearch:elasticsearch /etc/default/elasticsearch
- sudo systemctl enable elasticsearch.service
install:
- pip install -U importlib_metadata
- pip install -r requirements/travis.txt
script:
# Use SQLite to avoid requiring the DB to be setup
- bash -c "DB=sqlite python manage.py build_assets"
- py.test --cov-report=term --cov=. -v --durations=25
after_success:
- codecov
- language: node_js
node_js: 12
before_install: cd pootle/static/js
script:
- npm run lint
- npm run test
notifications:
email:
on_failure: always
on_success: change