<commit_before>language: python
dist: trusty
python:
  - "2.7"
  - "3.3"
  - "3.4"
  - "3.5"
  - "3.6"
# @see https://docs.travis-ci.com/user/database-setup/#MySQL
services:
  - mysql
before_script:
  - mysql -u root -e "CREATE DATABASE index_digest;"
  - mysql -u root -e "CREATE USER 'index_digest'@'localhost' IDENTIFIED BY 'qwerty';"
  - mysql -u root -e "GRANT ALL ON index_digest.* TO 'index_digest'@'localhost';"
  - "./sql/populate.sh" # import the test schema files
  - mysql -hlocalhost -uindex_digest -pqwerty index_digest -v -e '\s; SHOW TABLES;'

install: make install
script: make coverage && make lint && make demo

# @see https://github.com/nickstenning/travis-pip-cache/issues/1
cache: pip<commit_msg>Travis | set up MySQL 5.7 via docker<commit_after>language: python
dist: trusty
python:
  - "2.7"
  - "3.3"
  - "3.4"
  - "3.5"
  - "3.6"
services:
  - docker
before_script:
  # @see https://medium.com/@mtparet/install-mysql-server-5-7-on-travis-96f2ebc0f339
  # @see https://hub.docker.com/_/mysql/
  - sudo docker run -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -d -p 3306:3306 mysql:5.7
  - sudo docker ps
  # set up a database
  - mysql -u root -e "CREATE DATABASE index_digest;"
  - mysql -u root -e "CREATE USER 'index_digest'@'localhost' IDENTIFIED BY 'qwerty';"
  - mysql -u root -e "GRANT ALL ON index_digest.* TO 'index_digest'@'localhost';"
  - "./sql/populate.sh" # import the test schema files
  - mysql -hlocalhost -uindex_digest -pqwerty index_digest -v -e '\s; SHOW TABLES;'

install: make install
script: make coverage && make lint && make demo

# @see https://github.com/nickstenning/travis-pip-cache/issues/1
cache: pip
{'fraction_non_alphanumeric': 0.15127582017010935, 'fraction_numerical': 0.02612393681652491, 'mean_word_length': 3.322834645669291, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, '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': '1110651', 'n_tokens_mistral': 667, 'n_tokens_neox': 635, 'n_words': 167}