<commit_before>env:
  global:
    - DATABASE_URL='mysql://root@localhost/test_treeherder'
    - DATABASE_URL_RO='mysql://root@localhost/test_treeherder'
    - BROKER_URL='amqp://guest:guest@localhost:5672//'
    - TREEHERDER_DJANGO_SECRET_KEY='secretkey-of-at-50-characters-to-pass-check-deploy'
matrix:
  include:
    # Each entry here creates another sub-job.

    # Job 1: Linters
    - env: linters
      sudo: false
      language: python
      python: "2.7.11"
      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
        - pip install --disable-pip-version-check --upgrade pip==8.1.1
        # Manually create the test database (required by the Django system checks), since
        # this job doesn't run pytest which would normally have created it for us.
        - mysql -u root -e 'create database test_treeherder;'
      install:
        - npm install
        - pip install --disable-pip-version-check --require-hashes -r requirements/common.txt -r requirements/dev.txt
      script:
        - grunt checkjs
        - python lints/queuelint.py
        - flake8 --show-source
        - isort --check-only --diff --quiet
        # Several security features in settings.py (eg setting HSTS headers) are conditional on
        # 'https://' being in the site URL. In addition, we override the test environment's debug
        # value so the tests pass. The real environment variable will be checked during deployment.
        # Replace grep with `--fail-level WARNING` once we're using Django 1.10, since in
        # previous versions an exit code of 1 is hard-coded to only ERROR and above:
        # https://github.com/django/django/commit/287532588941d2941e19c4cd069bcbd8af889203
        - SITE_URL='https://treeherder.dev' TREEHERDER_DEBUG='False' ./manage.py check --deploy  2>&1 | awk '/^WARNINGS/{err=1} {print} END{exit err}'

    # Job 2: Nodejs UI tests
    - env: ui-tests
      sudo: false
      language: node_js
      node_js: "5.3.0"
      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

    # Job 3: Python Tests Chunk A
    - env: python-tests-main
      # Once mysql 5.6 is available on the container infra, we should switch back
      # to it for its faster boot time, by setting `sudo: false`.
      sudo: required
      dist: trusty
      language: python
      python: "2.7.11"
      cache:
        directories:
          - ~/venv
      services:
        - rabbitmq
        - memcached
      before_install:
        # Manually install mysql 5.6 since the default is v5.5.
        - sudo apt-get -qq update
        - sudo apt-get -qq install mysql-server-5.6 mysql-client-5.6 mysql-client-core-5.6
        - echo -e '\n[mysqld]\nsql_mode="STRICT_ALL_TABLES"\n' | sudo tee -a /etc/mysql/my.cnf
        - sudo service mysql restart
        # 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
        - pip install --disable-pip-version-check --upgrade pip==8.1.1
      install:
        - pip install --disable-pip-version-check --require-hashes -r requirements/common.txt -r requirements/dev.txt
      script:
        - py.test tests/ --runslow --ignore=tests/e2e/ --ignore=tests/etl/ --ignore=tests/log_parser/

    # Job 4: Python Tests Chunk B
    - env: python-tests-e2e-etl-and-logparser
      # Once mysql 5.6 is available on the container infra, we should switch back
      # to it for its faster boot time, by setting `sudo: false`.
      sudo: required
      dist: trusty
      language: python
      python: "2.7.11"
      cache:
        directories:
          - ~/venv
      services:
        - rabbitmq
        - memcached
      before_install:
        # Manually install mysql 5.6 since the default is v5.5.
        - sudo apt-get -qq update
        - sudo apt-get -y install mysql-server-5.6 mysql-client-5.6 mysql-client-core-5.6
        - echo -e '\n[mysqld]\nsql_mode="STRICT_ALL_TABLES"\n' | sudo tee -a /etc/mysql/my.cnf
        - sudo service mysql restart
        # 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
        - pip install --disable-pip-version-check --upgrade pip==8.1.1
      install:
        - pip install --disable-pip-version-check --require-hashes -r requirements/common.txt -r requirements/dev.txt
      script:
        - py.test tests/e2e/ tests/etl/ tests/log_parser/ --runslow<commit_msg>Bug 1275796 - Travis: Revert change to apt-get command<commit_after>env:
  global:
    - DATABASE_URL='mysql://root@localhost/test_treeherder'
    - DATABASE_URL_RO='mysql://root@localhost/test_treeherder'
    - BROKER_URL='amqp://guest:guest@localhost:5672//'
    - TREEHERDER_DJANGO_SECRET_KEY='secretkey-of-at-50-characters-to-pass-check-deploy'
matrix:
  include:
    # Each entry here creates another sub-job.

    # Job 1: Linters
    - env: linters
      sudo: false
      language: python
      python: "2.7.11"
      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
        - pip install --disable-pip-version-check --upgrade pip==8.1.1
        # Manually create the test database (required by the Django system checks), since
        # this job doesn't run pytest which would normally have created it for us.
        - mysql -u root -e 'create database test_treeherder;'
      install:
        - npm install
        - pip install --disable-pip-version-check --require-hashes -r requirements/common.txt -r requirements/dev.txt
      script:
        - grunt checkjs
        - python lints/queuelint.py
        - flake8 --show-source
        - isort --check-only --diff --quiet
        # Several security features in settings.py (eg setting HSTS headers) are conditional on
        # 'https://' being in the site URL. In addition, we override the test environment's debug
        # value so the tests pass. The real environment variable will be checked during deployment.
        # Replace grep with `--fail-level WARNING` once we're using Django 1.10, since in
        # previous versions an exit code of 1 is hard-coded to only ERROR and above:
        # https://github.com/django/django/commit/287532588941d2941e19c4cd069bcbd8af889203
        - SITE_URL='https://treeherder.dev' TREEHERDER_DEBUG='False' ./manage.py check --deploy  2>&1 | awk '/^WARNINGS/{err=1} {print} END{exit err}'

    # Job 2: Nodejs UI tests
    - env: ui-tests
      sudo: false
      language: node_js
      node_js: "5.3.0"
      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

    # Job 3: Python Tests Chunk A
    - env: python-tests-main
      # Once mysql 5.6 is available on the container infra, we should switch back
      # to it for its faster boot time, by setting `sudo: false`.
      sudo: required
      dist: trusty
      language: python
      python: "2.7.11"
      cache:
        directories:
          - ~/venv
      services:
        - rabbitmq
        - memcached
      before_install:
        # Manually install mysql 5.6 since the default is v5.5.
        - sudo apt-get -qq update
        - sudo apt-get -qq install mysql-server-5.6 mysql-client-5.6 mysql-client-core-5.6
        - echo -e '\n[mysqld]\nsql_mode="STRICT_ALL_TABLES"\n' | sudo tee -a /etc/mysql/my.cnf
        - sudo service mysql restart
        # 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
        - pip install --disable-pip-version-check --upgrade pip==8.1.1
      install:
        - pip install --disable-pip-version-check --require-hashes -r requirements/common.txt -r requirements/dev.txt
      script:
        - py.test tests/ --runslow --ignore=tests/e2e/ --ignore=tests/etl/ --ignore=tests/log_parser/

    # Job 4: Python Tests Chunk B
    - env: python-tests-e2e-etl-and-logparser
      # Once mysql 5.6 is available on the container infra, we should switch back
      # to it for its faster boot time, by setting `sudo: false`.
      sudo: required
      dist: trusty
      language: python
      python: "2.7.11"
      cache:
        directories:
          - ~/venv
      services:
        - rabbitmq
        - memcached
      before_install:
        # Manually install mysql 5.6 since the default is v5.5.
        - sudo apt-get -qq update
        - sudo apt-get -qq install mysql-server-5.6 mysql-client-5.6 mysql-client-core-5.6
        - echo -e '\n[mysqld]\nsql_mode="STRICT_ALL_TABLES"\n' | sudo tee -a /etc/mysql/my.cnf
        - sudo service mysql restart
        # 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
        - pip install --disable-pip-version-check --upgrade pip==8.1.1
      install:
        - pip install --disable-pip-version-check --require-hashes -r requirements/common.txt -r requirements/dev.txt
      script:
        - py.test tests/e2e/ tests/etl/ tests/log_parser/ --runslow
{'fraction_non_alphanumeric': 0.1091626882115314, 'fraction_numerical': 0.021391847227322805, 'mean_word_length': 2.083215397679026, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 12, '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': '6454347', 'n_tokens_mistral': 3556, 'n_tokens_neox': 3373, 'n_words': 996}