<commit_before>language: java

before_install:
  - wget https://archive.apache.org/dist/maven/maven-3/3.2.2/binaries/apache-maven-3.2.2-bin.tar.gz
  - tar xf apache-maven-3.2.2-bin.tar.gz
  - export M2_HOME=$PWD/apache-maven-3.2.2
  - export PATH=$M2_HOME/bin:$PATH

sudo: required
dist: trusty
script: |
        if [ "$TRAVIS_EVENT_TYPE" == cron ] && [ "$TRAVIS_BRANCH" == devel ]
        then
            bash .travis/build-packages
        else
            mvn -Psafer -Pintegration -B -e -T 1C -Dcheckstyle.consoleOutput=false verify
        fi
jdk: oraclejdk8

env:
  # the SONAR_TOKEN variable
  - secure: "<KEY>
  # TODO: Add a SONAR_GITHUB_TOKEN to support Sonar on pull requests (or wait until they improve their compatibility)

addons:
  sonarqube:
    branches:
      - devel
      - master
  apt:
    packages:
      - oracle-java8-installer
  postgresql: "9.4"

services:
  - postgresql

before_script:
  - export GIT_BRANCH=$TRAVIS_BRANCH
  - psql -c "create user test password '<PASSWORD>';" -U postgres
  - psql -c "create database test owner test;" -U postgres

cache:
  directories:
    - '$HOME/.sonar/cache'

after_success:
  - |
    if [ "$TRAVIS_EVENT_TYPE" != cron ] && [ "$TRAVIS_REPO_SLUG" == torodb/torodb ]
    then
        bash <(curl -s https://codecov.io/bash) || echo 'Codecov did not collect coverage reports'
    else
        echo 'Codecov not notified'
    fi
  - |
    if [ "$TRAVIS_EVENT_TYPE" != cron ] && [ "$TRAVIS_REPO_SLUG" == torodb/torodb ]
    then
        mvn sonar:sonar || echo 'Error while notifying SonarQube'
    else
        echo 'SonarQube not notified'
    fi
  <commit_msg>Adapted .travis to the new project architecture<commit_after>language: java
sudo: required
dist: trusty
jdk: oraclejdk8

before_install:
  - wget https://archive.apache.org/dist/maven/maven-3/3.2.2/binaries/apache-maven-3.2.2-bin.tar.gz
  - tar xf apache-maven-3.2.2-bin.tar.gz
  - export M2_HOME=$PWD/apache-maven-3.2.2
  - export PATH=$M2_HOME/bin:$PATH

addons:
  apt:
    packages:
      - oracle-java8-installer
   
cache:
  directories:
  - $HOME/.m2/repository
  
before_cache:
  - rm -f $HOME/.m2/repository/com/torodb

before_script:
  - export GIT_BRANCH=$TRAVIS_BRANCH

script: mvn -Psafer -Pintegration -B -e -T 1C -Dcheckstyle.consoleOutput=false verify

after_success:
  - |
    if [ "$TRAVIS_EVENT_TYPE" != cron ] && [ "$TRAVIS_REPO_SLUG" == gortiz/server ]
    then
        bash <(curl -s https://codecov.io/bash) || echo 'Codecov did not collect coverage reports'
    else
        echo 'Codecov not notified'
    fi
  
{'fraction_non_alphanumeric': 0.1252927400468384, 'fraction_numerical': 0.0156128024980484, 'mean_word_length': 2.7361516034985423, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '5031944', 'n_tokens_mistral': 1007, 'n_tokens_neox': 962, 'n_words': 212}