<commit_before>#!/usr/bin/env bash

# Build and test all the containers.

set -e
[ "$DEBUG" == 'true' ] && set -x

function build_container {
  VER="$1"
  pushd ${VER} 1> /dev/null
  docker build --quiet -t panubo/python:${VER}-test . 
  popd 1> /dev/null
}

for v in 2.7 3.2 3.3 3.4 3.5 3.6 3.7; do
  build_container ${v}
  OUTPUT=$(docker run --rm -ti panubo/python:${v}-test python${v} --version)
  [[ "${OUTPUT}" = "Python ${v}"* ]] || { echo "Version test failed. $OUTPUT"; exit 128; } && { echo "$v OK."; }
done

# All versions test
build_container all
for v in 2.7 3.3 3.4 3.5 3.6 3.7; do
  OUTPUT=$(docker run --rm -ti panubo/python:all-test python${v} --version)
  [[ "${OUTPUT}" = "Python ${v}"* ]] || { echo "Version test failed. $OUTPUT"; exit 128; } && { echo "$v OK."; }
done
<commit_msg>Make test not build image in travis<commit_after>#!/usr/bin/env bash

# Build and test all the containers.

set -e
[ "${DEBUG}" == 'true' ] && set -x

function build_container {
  VER="$1"
  pushd ${VER} 1> /dev/null
  echo ">> Building ${VER}"
  docker build --quiet -t panubo/python:${VER}-test .
  popd 1> /dev/null
}

function pull_container {
  VER="$1"
  echo ">> Pulling ${VER}"
  docker pull panubo/python:${VER}
  docker tag panubo/python:${VER} panubo/python:${VER}-test
}

for v in 2.7 3.2 3.3 3.4 3.5 3.6 3.7; do
  [ "${TRAVIS}" == 'true' ] && pull_container ${v} || build_container ${v}
  OUTPUT=$(docker run --rm -ti panubo/python:${v}-test python${v} --version)
  [[ "${OUTPUT}" = "Python ${v}"* ]] || { echo "Version test failed. $OUTPUT"; exit 128; } && { echo "> $v OK."; }
done

# All versions test
[ "${TRAVIS}" == 'true' ] && pull_container all || build_container all
for v in 2.7 3.3 3.4 3.5 3.6 3.7; do
  OUTPUT=$(docker run --rm -ti panubo/python:all-test python${v} --version)
  [[ "${OUTPUT}" = "Python ${v}"* ]] || { echo "Version test failed. $OUTPUT"; exit 128; } && { echo "> $v OK."; }
done

{'fraction_non_alphanumeric': 0.21465696465696466, 'fraction_numerical': 0.036902286902286904, 'mean_word_length': 3.230769230769231, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '1917251', 'n_tokens_mistral': 797, 'n_tokens_neox': 729, 'n_words': 228}