<commit_before>---
# Use containers instead of full VMs for faster startup.
sudo: required

services:
  - docker

notifications:
  # default: send to commiter
  email:
    on_success: change
    on_failure: always
  slack:
    on_success: always
    on_failure: always
    rooms:
      secure: "<KEY>
               <KEY>
               <KEY>
               sCVu+7bVA9uaa+v0U63l0ONYmkQ9+oQLXTPDu5ueI/hYWHobs7JWE+b9uNkVsdS41P/m+EobtC/mNS\
               P<KEY>
               <KEY>
               x3elk66MuSbcQfsx/o8fp6C9lnTGbGzIzqDe0Ll2vL5H5YR+rw5yLN9+Z8gdhVhulHZSvzyAQ3XBI+\
               XhX5ExAT5v76Tq8i5s/3+/vgSlOCxs7eudpAaZeKMxU4/aBTXbI13Nm7eTo="

# the syntax check scripts as well as yamllint need python3
language: python
python:
  - 3.6

# cache the docker images
cache:
  pip: true
  directories:
    - $HOME/docker

# disable the default submodule logic, as travis can't reach gitlab anyway
git:
  submodules: false

addons:
  apt:
    packages:
      - bridge-utils
      - python3-jinja2
      - python3-yaml

before_install:
  # Load cached docker images
  - >
    if [ -d $HOME/docker ];
    then
      ls $HOME/docker/*.tar.gz | xargs -I {file} sh -c "zcat {file} | docker load";
    fi
  - sudo pip install yamllint
  - sudo wget https://releases.hashicorp.com/vagrant/2.1.2/vagrant_2.1.2_x86_64.deb -P /tmp
  - sudo dpkg -i /tmp/vagrant_2.1.2_x86_64.deb
  - sudo apt-add-repository -y ppa:ansible/ansible-2.6
  - sudo apt -q update
  - sudo apt -y install ansible

script:
  - sudo ./scripts/travis_tests

before_cache:
  # Save tagged docker images
  - "mkdir -p $HOME/docker"
  - "docker images -a --filter='dangling=false' --format '{{.Repository}}:{{.Tag}} {{.ID}}' \
       | xargs -n 2 -t sh \
         -c 'test -e $HOME/docker/$1.tar.gz || docker save $0 | gzip -c6 > $HOME/docker/$1.tar.gz' \
    "<commit_msg>move travis checks to separate script lines<commit_after>---
# Use containers instead of full VMs for faster startup.
sudo: required

services:
  - docker

notifications:
  # default: send to commiter
  email:
    on_success: change
    on_failure: always
  slack:
    on_success: always
    on_failure: always
    rooms:
      secure: "<KEY>
               AUpxDSRkGWfNvOePY4LBGrjeszPmqUvsWheC1SXD/QnFZAnLpEMnX5CyY7mlgKPN8WyzCVj6IrVzmh\
               +fbCeTNFgI8nPApIB/4nTUO6GBKasTzx1A9FREoGnMUnNkyYPR8A+xYZsx2lZui1eIewU0EA3S7ATv\
               94AEfdi0MR04Enn8r3QK8cpzAUCT0pDEUuye9puANHlqIhW0PsYL6jS5f9zwS5fKu7pVunpMF+K7eH\
               sCVu+7bVA9uaa+v0U63l0ONYmkQ9+oQLXTPDu5ueI/hYWHobs7JWE+b9uNkVsdS41P/m+EobtC/mNS\
               P99To6Ur+3PvKBjrUK7PqEsS5uxlzk5ttup/0beC6KM/hzbMc28M3KlBpyOUO0U2jrW1Q2oxlN/W0f\
               sk7cldPa5reSufTd4U3+6blTJFj6PtDRnnJboQgZZUA/TM76x0zobuf/qlJu4u5aMEMxobSY8b6H73\
               x3elk66MuSbcQfsx/o8fp6C9lnTGbGzIzqDe0Ll2vL5H5YR+rw5yLN9+Z8gdhVhulHZSvzyAQ3XBI+\
               XhX5ExAT5v76Tq8i5s/3+/vgSlOCxs7eudpAaZeKMxU4/aBTXbI13Nm7eTo="

# the syntax check scripts as well as yamllint need python3
language: python
python:
  - 3.6

# cache the docker images
cache:
  pip: true
  directories:
    - $HOME/docker

# disable the default submodule logic, as travis can't reach gitlab anyway
git:
  submodules: false

addons:
  apt:
    packages:
      - bridge-utils
      - python3-jinja2
      - python3-yaml

before_install:
  # Load cached docker images
  - >
    if [ -d $HOME/docker ];
    then
      ls $HOME/docker/*.tar.gz | xargs -I {file} sh -c "zcat {file} | docker load";
    fi
  - sudo pip install yamllint
  - sudo wget https://releases.hashicorp.com/vagrant/2.1.2/vagrant_2.1.2_x86_64.deb -P /tmp
  - sudo dpkg -i /tmp/vagrant_2.1.2_x86_64.deb
  - sudo apt-add-repository -y ppa:ansible/ansible-2.6
  - sudo apt -q update
  - sudo apt -y install ansible

script:
  - "                      ./scripts/syntaxt_check       ||  travis_terminate 1"
  - "sudo                  ./start-vm --provider docker  ||  travis_terminate 1"
  - "sudo env REEANTRANT=1 ./start-vm --provider docker  ||  travis_terminate 1"

before_cache:
  # Save tagged docker images
  - "mkdir -p $HOME/docker"
  - "docker images -a --filter='dangling=false' --format '{{.Repository}}:{{.Tag}} {{.ID}}' \
       | xargs -n 2 -t sh \
         -c 'test -e $HOME/docker/$1.tar.gz || docker save $0 | gzip -c6 > $HOME/docker/$1.tar.gz' \
    "
{'fraction_non_alphanumeric': 0.10685249709639953, 'fraction_numerical': 0.0478513356562137, 'mean_word_length': 2.57344398340249, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, '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': '164448', 'n_tokens_mistral': 1953, 'n_tokens_neox': 1818, 'n_words': 346}