<commit_before>dist: bionic
language: python
sudo: required
cache:
  directories:
    - ~/.cache/pip

env:
  global:
    - PIP_WHEEL_DIR=$HOME/.cache/pip/wheels
    - PIP_FIND_LINKS=file://$HOME/.cache/pip/wheels
    - TESTDATA_DIR=$HOME/testdata
    - PGUSER=postgres
    - PGPORT=5432

addons:
  postgresql: 12
  apt:
    sources:
      - sourceline: 'ppa:ubuntugis/ppa'
    packages:
      - libgdal-dev
      - gdal-bin
      - libsqlite3-mod-spatialite
      - libproj-dev
      - python3-dev
      - postgresql-12-postgis-2.5

services:
  - postgresql

python:
  - '3.7'

before_install:
  - wget -O esa-snap_sentinel_unix_7_0.sh https://step.esa.int/downloads/7.0/installers/esa-snap_sentinel_unix_7_0.sh
  - bash esa-snap_sentinel_unix_7_0.sh -q
  - export PATH=$PATH:/opt/snap/bin

install:
  - pip install --ignore-installed six # install six inside the venv since the system version is too old
  - pip install numpy
  - pip install GDAL==$(gdal-config --version) --global-option=build_ext --global-option="$(gdal-config --cflags)"
  - pip install -r requirements-dev.txt
  - pip install coveralls coverage
  - python setup.py install

#before_script:
#  - travis_wait 40 . ./pyroSAR/install/download_testdata.sh

before_script:
  - psql -U postgres -c "create extension postgis"

script:
  - coverage run --source pyroSAR/ -m pytest<commit_msg>travis back to posgres 9.6 with postgis 2.4<commit_after>dist: bionic
language: python
sudo: required
cache:
  directories:
    - ~/.cache/pip

env:
  global:
    - PIP_WHEEL_DIR=$HOME/.cache/pip/wheels
    - PIP_FIND_LINKS=file://$HOME/.cache/pip/wheels
    - TESTDATA_DIR=$HOME/testdata
    - PGUSER=postgres
    - PGPORT=5432

addons:
  postgresql: 9.6
  apt:
    sources:
      - sourceline: 'ppa:ubuntugis/ppa'
    packages:
      - libgdal-dev
      - gdal-bin
      - libsqlite3-mod-spatialite
      - libproj-dev
      - python3-dev
      - postgresql-9.6-postgis-2.4

services:
  - postgresql

python:
  - '3.7'

before_install:
  - wget -O esa-snap_sentinel_unix_7_0.sh https://step.esa.int/downloads/7.0/installers/esa-snap_sentinel_unix_7_0.sh
  - bash esa-snap_sentinel_unix_7_0.sh -q
  - export PATH=$PATH:/opt/snap/bin

install:
  - pip install --ignore-installed six # install six inside the venv since the system version is too old
  - pip install numpy
  - pip install GDAL==$(gdal-config --version) --global-option=build_ext --global-option="$(gdal-config --cflags)"
  - pip install -r requirements-dev.txt
  - pip install coveralls coverage
  - python setup.py install

#before_script:
#  - travis_wait 40 . ./pyroSAR/install/download_testdata.sh

before_script:
  - psql -c 'create database travis_ci_test;' -U postgres

script:
  - coverage run --source pyroSAR/ -m pytest
{'fraction_non_alphanumeric': 0.12040742088032011, 'fraction_numerical': 0.018915969443433975, 'mean_word_length': 2.840782122905028, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '165578', 'n_tokens_mistral': 1086, 'n_tokens_neox': 1030, 'n_words': 208}