2019-09-09 19:36:33 +00:00
|
|
|
sudo: false
|
2015-10-24 21:13:21 +00:00
|
|
|
language: python
|
|
|
|
|
2020-11-19 19:34:38 +00:00
|
|
|
services:
|
|
|
|
- redis
|
|
|
|
- postgresql
|
|
|
|
|
|
|
|
addons:
|
|
|
|
postgresql: "11.2"
|
|
|
|
|
|
|
|
before_install:
|
|
|
|
- sudo service postgresql stop
|
|
|
|
- sudo apt-get update
|
|
|
|
- sudo apt-get remove -y postgresql\*
|
|
|
|
- sudo apt-get install postgresql-11-postgis-2.5 postgresql-client
|
|
|
|
- sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/11/main/postgresql.conf
|
|
|
|
- sudo cp /etc/postgresql/{9.6,11}/main/pg_hba.conf
|
|
|
|
- sudo service postgresql start 11
|
|
|
|
|
2019-09-09 19:36:33 +00:00
|
|
|
install:
|
2020-11-19 19:34:38 +00:00
|
|
|
- pip install --upgrade pip
|
2019-09-09 19:36:33 +00:00
|
|
|
- pip install tox
|
2016-07-02 18:20:04 +00:00
|
|
|
|
2015-11-29 20:39:13 +00:00
|
|
|
before_script:
|
2020-11-19 19:34:38 +00:00
|
|
|
- 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 -pg-version 11
|
|
|
|
- sudo service postgresql restart 11
|
2017-12-04 07:30:31 +00:00
|
|
|
- psql -U postgres -c 'CREATE DATABASE ogn_test;'
|
|
|
|
- psql -U postgres -c 'CREATE EXTENSION postgis;'
|
2015-11-29 20:39:13 +00:00
|
|
|
|
2015-10-24 21:13:21 +00:00
|
|
|
script:
|
2019-09-09 19:36:33 +00:00
|
|
|
- tox
|
|
|
|
|
2020-11-19 19:34:38 +00:00
|
|
|
|
2019-09-09 19:36:33 +00:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- python: "3.6"
|
|
|
|
env: TOXENV='py36'
|
|
|
|
- python: "3.7"
|
|
|
|
env: TOXENV='py37'
|
|
|
|
- python: "3.7"
|
|
|
|
env: TOXENV='flake8'
|
2016-01-06 00:30:01 +00:00
|
|
|
|
2015-10-24 21:13:21 +00:00
|
|
|
after_success:
|
2019-09-09 19:36:33 +00:00
|
|
|
- tox -e codecov
|
2020-11-19 19:34:38 +00:00
|
|
|
|
|
|
|
after_failure:
|
|
|
|
- echo "Job failed..."
|
|
|
|
- sudo cat /var/log/syslog
|
|
|
|
- psql --version
|