<commit_before>sudo: true

install:
  - curl -sLo - http://j.mp/install-travis-docker | sh -xe

script:
  - echo "==> Building the main Docker image..."
  - ./run 'docker build -f test/Dockerfile-ubuntu14.04 -t img .  &&  docker run -v $(pwd):/data img'
  - ./run 'docker build -f test/Dockerfile-ubuntu12.04 -t img .  &&  docker run -v $(pwd):/data img'
  - ./run 'docker build -f test/Dockerfile-debian8     -t img .  &&  docker run -v $(pwd):/data img'
  - ./run 'docker build -f test/Dockerfile-debian7     -t img .  &&  docker run -v $(pwd):/data img'
  - ./run 'docker build -f test/Dockerfile-centos7     -t img .  &&  docker run -v $(pwd):/data img'
  - ./run 'docker build -f test/Dockerfile-centos6     -t img .  &&  docker run -v $(pwd):/data img'

  - echo "==> Validating the test results..."
  - grep '^The Monit daemon.*uptime' result-ubuntu14.04  ||  exit 1
  - grep '^The Monit daemon.*uptime' result-ubuntu12.04  ||  exit 1
  - grep '^The Monit daemon.*uptime' result-debian8      ||  exit 1
  - grep '^The Monit daemon.*uptime' result-debian7      ||  exit 1
  - grep '^The Monit daemon.*uptime' result-centos7      ||  exit 1
  - grep '^The Monit daemon.*uptime' result-centos6      ||  exit 1
<commit_msg>Update: use new Docker mechanism for Travis CI<commit_after>sudo: true
services:
    - docker

before_install:
    - docker info
    - docker version

    - docker build  -f test/Dockerfile-ubuntu14.04  -t monit_trusty   .
    - docker build  -f test/Dockerfile-ubuntu12.04  -t monit_precise  .
    - docker build  -f test/Dockerfile-debian8      -t monit_jessie   .
    - docker build  -f test/Dockerfile-debian7      -t monit_wheezy   .
    - docker build  -f test/Dockerfile-centos7      -t monit_centos7  .
    - docker build  -f test/Dockerfile-centos6      -t monit_centos6  .

script:
    - docker run -d -v $(pwd):/data --name c1 monit_trusty
    - docker run -d -v $(pwd):/data --name c2 monit_precise
    - docker run -d -v $(pwd):/data --name c3 monit_jessie
    - docker run -d -v $(pwd):/data --name c4 monit_wheezy
    - docker run -d -v $(pwd):/data --name c5 monit_centos7
    - docker run -d -v $(pwd):/data --name c6 monit_centos6
    - sleep 30

    - echo "==> Validating the test results..."
    - grep '^The Monit daemon.*uptime' result-ubuntu14.04
    - grep '^The Monit daemon.*uptime' result-ubuntu12.04
    - grep '^The Monit daemon.*uptime' result-debian8
    - grep '^The Monit daemon.*uptime' result-debian7
    - grep '^The Monit daemon.*uptime' result-centos7
    - grep '^The Monit daemon.*uptime' result-centos6

{'fraction_non_alphanumeric': 0.14196810579541036, 'fraction_numerical': 0.025670945157526253, 'mean_word_length': 2.3664921465968587, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '556568', 'n_tokens_mistral': 1051, 'n_tokens_neox': 952, 'n_words': 272}