<commit_before>env:
  global:
    - DATABASE_URL='mysql://root@localhost/test_treeherder'
    - DATABASE_URL_RO='mysql://root@localhost/test_treeherder'
    - TREEHERDER_DJANGO_SECRET_KEY='secretkey-1234'
matrix:
  include:
    # Each entry here creates another sub-job.

    - env: linters
      sudo: false
      language: python
      python: "2.7"
      cache:
        directories:
          - ~/venv
          - node_modules
      before_install:
        # Create a clean virtualenv rather than using the one given to us,
        # to work around: https://github.com/travis-ci/travis-ci/issues/4873
        - if [[ ! -f ~/venv/bin/activate ]]; then virtualenv ~/venv; fi
        - source ~/venv/bin/activate
      install:
        - npm install
        - ./bin/peep.py install --disable-pip-version-check -r requirements/common.txt -r requirements/dev.txt
      script:
        - grunt checkjs
        - flake8 --show-source
        - isort --check-only --diff --quiet

    - env: ui-tests
      sudo: false
      language: node_js
      node_js: "4.2.1"
      cache:
        # Note: This won't re-use the same cache as the linters job,
        # since caches are tied to the language/version combination.
        directories:
          - node_modules
      install:
        - npm install
      before_script:
        # Required for Karma tests (http://docs.travis-ci.com/user/gui-and-headless-browsers/)
        - export DISPLAY=:99.0
        - sh -e /etc/init.d/xvfb start
      script:
        - npm test
        - ./node_modules/.bin/grunt build --production

    - env: python-tests
      # Once mysql 5.6 is available on the container infra, we should switch back
      # to it, by setting `sudo: false`, so we can use caching for this job.
      sudo: required
      dist: trusty
      python: "2.7"
      services:
        - rabbitmq
        - memcached
      before_install:
        # Manually install mysql 5.6 since the default is v5.5.
        - sudo apt-get update -qq
        - sudo apt-get install -qq mysql-server-5.6 mysql-client-5.6 mysql-client-core-5.6
      install:
        # We use `--user` with pip install since the non-container infra doesn't set up
        # a virtualenv, and we cannot use sudo due to:
        #   https://github.com/travis-ci/travis-ci/issues/4989
        # Disabling the pip version check speeds up the install considerably, since peep
        # calls pip once per package, which results in duplicate checks (plus log spam).
        - ./bin/peep.py install --user -r requirements/common.txt -r requirements/dev.txt --disable-pip-version-check
      script:
        - py.test tests/$* --runslow
<commit_msg>Bug 1219889 - Travis: Use pip rather than peep for the python-tests job<commit_after>env:
  global:
    - DATABASE_URL='mysql://root@localhost/test_treeherder'
    - DATABASE_URL_RO='mysql://root@localhost/test_treeherder'
    - TREEHERDER_DJANGO_SECRET_KEY='secretkey-1234'
matrix:
  include:
    # Each entry here creates another sub-job.

    - env: linters
      sudo: false
      language: python
      python: "2.7"
      cache:
        directories:
          - ~/venv
          - node_modules
      before_install:
        # Create a clean virtualenv rather than using the one given to us,
        # to work around: https://github.com/travis-ci/travis-ci/issues/4873
        - if [[ ! -f ~/venv/bin/activate ]]; then virtualenv ~/venv; fi
        - source ~/venv/bin/activate
      install:
        - npm install
        - ./bin/peep.py install --disable-pip-version-check -r requirements/common.txt -r requirements/dev.txt
      script:
        - grunt checkjs
        - flake8 --show-source
        - isort --check-only --diff --quiet

    - env: ui-tests
      sudo: false
      language: node_js
      node_js: "4.2.1"
      cache:
        # Note: This won't re-use the same cache as the linters job,
        # since caches are tied to the language/version combination.
        directories:
          - node_modules
      install:
        - npm install
      before_script:
        # Required for Karma tests (http://docs.travis-ci.com/user/gui-and-headless-browsers/)
        - export DISPLAY=:99.0
        - sh -e /etc/init.d/xvfb start
      script:
        - npm test
        - ./node_modules/.bin/grunt build --production

    - env: python-tests
      # Once mysql 5.6 is available on the container infra, we should switch back
      # to it, by setting `sudo: false`, so we can use caching for this job.
      sudo: required
      dist: trusty
      language: python
      python: "2.7"
      services:
        - rabbitmq
        - memcached
      before_install:
        # Manually install mysql 5.6 since the default is v5.5.
        - sudo apt-get update -qq
        - sudo apt-get install -qq mysql-server-5.6 mysql-client-5.6 mysql-client-core-5.6
      install:
        # This uses pip rather than peep, since it takes half the time, and unlike the other
        # jobs, this one cannot use caching. The hashes are validated in the linters job.
        - pip install --disable-pip-version-check -r requirements/common.txt -r requirements/dev.txt
      script:
        - py.test tests/$* --runslow

{'fraction_non_alphanumeric': 0.10021239621548561, 'fraction_numerical': 0.014095385209499904, 'mean_word_length': 1.9365079365079365, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, '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': '5641278', 'n_tokens_mistral': 1641, 'n_tokens_neox': 1573, 'n_words': 478}