<commit_before>sudo: false

notifications:
  email: false

language: python
cache: pip

services:
  - elasticsearch

addons:
  apt:
    packages:
    - yui-compressor

install:
  - pip install -U pip
  - bundle install --deployment --path ../gems --binstubs ../gem-bin
  # Now install the rest of the required Python packages:
  - CFLAGS="-O0" pip install -r requirements.txt
  - pip install python-coveralls
  - pip check
  # Create a basic general.yml file:
  - sed -r
    -e "s,(POMBOLA_DB_USER:) 'sayit',\\1 'postgres',"
    -e "s,(POMBOLA_DB_NAME:) '',\\1 'pombola',"
    -e "s,(DJANGO_SECRET_KEY:) '',\\1 'notatallsecret',"
    conf/general.yml-example > conf/general.yml

before_script:
  - createdb -U postgres pombola
  - psql -c 'CREATE EXTENSION postgis;' -U postgres -d pombola
  - ./manage.py migrate --noinput
  - ./manage.py collectstatic --noinput

script:
  - ./run-tests --coverage

after_success:
  - coveralls<commit_msg>Push test coverage data to Scrutinizer<commit_after>sudo: false

notifications:
  email: false

language: python
cache: pip

services:
  - elasticsearch

addons:
  apt:
    packages:
    - yui-compressor

install:
  - pip install -U pip
  - bundle install --deployment --path ../gems --binstubs ../gem-bin
  # Now install the rest of the required Python packages:
  - CFLAGS="-O0" pip install -r requirements.txt
  - pip install python-coveralls
  - pip install scrutinizer-ocular
  - pip check
  # Create a basic general.yml file:
  - sed -r
    -e "s,(POMBOLA_DB_USER:) 'sayit',\\1 'postgres',"
    -e "s,(POMBOLA_DB_NAME:) '',\\1 'pombola',"
    -e "s,(DJANGO_SECRET_KEY:) '',\\1 'notatallsecret',"
    conf/general.yml-example > conf/general.yml

before_script:
  - createdb -U postgres pombola
  - psql -c 'CREATE EXTENSION postgis;' -U postgres -d pombola
  - ./manage.py migrate --noinput
  - ./manage.py collectstatic --noinput

script:
  - ./run-tests --coverage

after_success:
  - coveralls
  - ocular --data-file ".coverage"
{'fraction_non_alphanumeric': 0.13707637835103692, 'fraction_numerical': 0.004046535154274153, 'mean_word_length': 2.8860510805500983, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '43912', 'n_tokens_mistral': 740, 'n_tokens_neox': 711, 'n_words': 194}