<commit_before>language: python
python: "3.4"

# TODO: go back to addons when travis supports pg 9.4
# https://github.com/travis-ci/travis-ci/issues/2983
#addons:
#    postgresql: '9.4'

services:
  - memcached
  - redis-server

compiler:
  - gcc

cache:
  directories:
    - node_modules
    - $HOME/.cache/pip/
    - $HOME/virtualenv/python3.4.2

env:
  global:
    - DJANGO_SETTINGS_MODULE="recipi.conf.travis"
    - RECIPI_TEST_DB_NAME=recipi_test
    - RECIPI_TEST_DB_USER=travis

before_install:
  - sudo apt-get update -qq

  # Remove the default PostgreSQL
  - sudo apt-get remove postgis libpq5 libpq-dev postgresql-9.1-postgis postgresql-9.2-postgis postgresql-9.3-postgis postgresql-9.1 postgresql-9.2 postgresql-9.3
  - sudo apt-get remove libgdal1
  - sudo apt-get autoremove -q --purge

  # Reference custom repos
  - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
  - sudo apt-get update -qq

  # Install custom PostgreSQL 9.4
  - sudo apt-get install postgresql-9.4 postgresql-client-9.4 postgresql-server-dev-9.4
  - sudo wget https://raw.githubusercontent.com/travis-ci/travis-cookbooks/master/ci_environment/postgresql/templates/ubuntu/pg_hba.conf.erb
  - sudo mv pg_hba.conf.erb /etc/postgresql/9.4/main/pg_hba.conf
  - sudo service postgresql restart 9.4

  # add proper c++- compiler for node-sass
  # TODO: Test if this is still required.
  - sudo apt-get install gcc-4.8 g++-4.8
  - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
  - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20
  - sudo g++ --version
  - npm config set python /usr/bin/python2.7

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

script:
  - psql --version
  - mv resources/nltk_data /home/travis/nltk_data
  - make develop
  - make test

after_success:
  - pip install "coveralls==0.4.1" coverage
  - coverage report
  - coveralls
<commit_msg>Update travis config to use new postgresql 9.4 instances.<commit_after>language: python
python: "3.4"

addons:
  postgresql: '9.4'

services:
  - memcached
  - redis-server

compiler: gcc

cache:
  directories:
    - node_modules
    - $HOME/.cache/pip/
    - $HOME/virtualenv/python3.4.2

env:
  global:
    - DJANGO_SETTINGS_MODULE="recipi.conf.travis"
    - RECIPI_TEST_DB_NAME=recipi_test
    - RECIPI_TEST_DB_USER=travis

before_install:
  - sudo apt-get update -qq

  # add proper c++- compiler for node-sass
  # TODO: Test if this is still required.
  - sudo apt-get install gcc-4.8 g++-4.8
  - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
  - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20
  - sudo g++ --version
  - npm config set python /usr/bin/python2.7

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

script:
  - psql --version
  - mv resources/nltk_data /home/travis/nltk_data
  - make develop
  - make test

after_success:
  - pip install "coveralls==0.4.1" coverage
  - coverage report
  - coveralls

{'fraction_non_alphanumeric': 0.12163509471585245, 'fraction_numerical': 0.02725157859754071, 'mean_word_length': 2.934640522875817, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6555472', 'n_tokens_mistral': 1216, 'n_tokens_neox': 1163, 'n_words': 263}