-
Notifications
You must be signed in to change notification settings - Fork 54
/
.travis.yml
89 lines (89 loc) · 3.13 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
dist: xenial
cache:
directories:
- node_modules
- vendors/node_modules
- "$HOME/.pip-cache/"
- "$HOME/.nvm"
- ".tox"
os: linux
language: python
python:
- "3.6"
addons:
chrome: stable
postgresql: "11.2"
apt:
packages:
- enchant
- gdal-bin
services:
- docker
- redis
- postgresql
- xvfb
before_install:
- sudo apt-get update
- sudo apt-get remove -y postgresql\*
- sudo apt-get install -y postgresql-11 postgresql-client-11
- sudo apt-get install -y postgis postgresql-11-postgis-2.5 postgresql-11-postgis-2.5-scripts
- sudo cp /etc/postgresql/{9.6,11}/main/pg_hba.conf
- sudo service postgresql restart 11
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
install:
- pip install --upgrade pip
- pip install tox==2.7.0
- psql --version
- node --version
- npm --version
- nvm install stable
before_script:
- psql -p 5433 -c "DROP DATABASE IF EXISTS seeddb;" -U postgres
- psql -p 5433 -c "DROP DATABASE IF EXISTS test_seeddb;" -U postgres
- cp config/settings/test_local_untracked.py config/settings/local_untracked.py
- sudo add-apt-repository ppa:timescale/timescaledb-ppa -y
- sudo apt-get update -q
- sudo apt-get install -y timescaledb-postgresql-11 timescaledb-tools
- sudo timescaledb-tune -yes
- sudo service postgresql restart
- psql -p 5433 -c "CREATE DATABASE seeddb;" -U postgres
- psql -p 5433 -d seeddb -c "CREATE EXTENSION postgis;" -U postgres
- free -tm
env:
global:
- DOCKER_COMPOSE_VERSION=1.23.1
- DJANGO_SETTINGS_MODULE=config.settings.travis
- DISPLAY=:99.0
- COVERALLS_REPO_TOKEN=y8UqJm8Bri5ZP8hr3YZM3guBaUKpsfoCv
- secure: HtOAAxPiA2NnSxXTBsmmXlFURH6WxnXXeaJLkjKc8cPWMsPX2QSouggtFYCPJxikrvN6bOYvDii67v2++E0qpuPO28LtywaLWu7AdDYxJ+rp4ysVjdi2Pp1bh723SZj2Xi3OMOLPz/kekT41DLKtoEzmBUEFEBIuJ27oU/phNGU=
matrix:
- TOX_ENV=python
- TOX_ENV=flake8
- TOX_ENV=docs
- TOX_ENV=functional
- TOX_ENV=apitest
script:
- tox -e $TOX_ENV
jobs:
include:
- stage: publish
install: skip
before_script: skip
script: travis_wait 30 docker/travis_build_docker.sh
env: DJANGO_SETTINGS_MODULE=config.settings.docker
after_failure:
- echo "Job Failed... Maybe these logs will help?"
- free -tm
- ls -alt ~
- ls -alt /home/travis/build/SEED-platform/seed/
- echo "============================================ celery log ============================================"
- cat /home/travis/build/SEED-platform/seed/celery.log
- echo "============================================ celery console log ============================================"
- cat /home/travis/build/SEED-platform/seed/celery_console.log
- echo "============================================ server log ============================================"
- cat /home/travis/build/SEED-platform/seed/runserver.log
- echo "============================================ syslog ============================================"
- sudo cat /var/log/syslog