<commit_before>sudo: required

language: php

php:
  - 5.6
  - 7.0
  - 7.1

env:
  global:
    - DOCTRINE_MONGODB_SERVER="mongodb://localhost:27017"
    - KEY_SERVER="hkp://keyserver.ubuntu.com:80"
    - MONGO_REPO_URI="https://repo.mongodb.org/apt/ubuntu"
    - MONGO_REPO_TYPE="precise/mongodb-org/"
    - SOURCES_LOC="/etc/apt/sources.list.d/mongodb.list"
    - DRIVER_VERSION="stable"
    - ADAPTER_VERSION="^1.0.0"
    - SERVER_VERSION="3.4"
    - KEY_ID="<KEY>"

matrix:
  include:
    - php: 5.6
      env: DRIVER_VERSION="1.6.3" SERVER_VERSION="3.0" COMPOSER_FLAGS="--prefer-lowest" KEY_ID="7F0CEB10"
    - php: 5.6
      env: DRIVER_VERSION="stable" SERVER_VERSION="3.2" KEY_ID="EA312927"

before_install:
  - sudo apt-key adv --keyserver ${KEY_SERVER} --recv ${KEY_ID}
  - echo "deb ${MONGO_REPO_URI} ${MONGO_REPO_TYPE}${SERVER_VERSION} multiverse" | sudo tee ${SOURCES_LOC}
  - sudo apt-get update -qq

install:
  - sudo apt-get --allow-unauthenticated install mongodb-org
  - if nc -z localhost 27017; then sudo service mongod stop; fi
  - sudo pip install mongo-orchestration
  - sudo mongo-orchestration start

before_script:
  - curl -XPUT http://localhost:8889/v1/sharded_clusters/myCluster --data @tests/sharded.json
  - composer self-update
  - if [[ ${TRAVIS_PHP_VERSION:0:2} == "5." ]]; then yes '' | pecl -q install -f mongo-${DRIVER_VERSION}; fi
  - if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then pecl install -f mongodb-${DRIVER_VERSION}; fi
  - if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then composer require "alcaeus/mongo-php-adapter=${ADAPTER_VERSION}" --ignore-platform-reqs; fi
  - composer update ${COMPOSER_FLAGS}

script:
  - ./vendor/bin/phpunit --coverage-clover=coverage.clover

after_script:
    - wget https://scrutinizer-ci.com/ocular.phar
    - php ocular.phar code-coverage:upload --format=php-clover coverage.clover
<commit_msg>Remove tests against MongoDB 3.0<commit_after>sudo: required

language: php

php:
  - 5.6
  - 7.0
  - 7.1

env:
  global:
    - DOCTRINE_MONGODB_SERVER="mongodb://localhost:27017"
    - KEY_SERVER="hkp://keyserver.ubuntu.com:80"
    - MONGO_REPO_URI="https://repo.mongodb.org/apt/ubuntu"
    - MONGO_REPO_TYPE="precise/mongodb-org/"
    - SOURCES_LOC="/etc/apt/sources.list.d/mongodb.list"
    - DRIVER_VERSION="stable"
    - ADAPTER_VERSION="^1.0.0"
    - SERVER_VERSION="3.4"
    - KEY_ID="<KEY>"

matrix:
  include:
    - php: 5.6
      env: DRIVER_VERSION="1.6.3" COMPOSER_FLAGS="--prefer-lowest" SERVER_VERSION="3.2" KEY_ID="EA312927"

before_install:
  - sudo apt-key adv --keyserver ${KEY_SERVER} --recv ${KEY_ID}
  - echo "deb ${MONGO_REPO_URI} ${MONGO_REPO_TYPE}${SERVER_VERSION} multiverse" | sudo tee ${SOURCES_LOC}
  - sudo apt-get update -qq

install:
  - sudo apt-get --allow-unauthenticated install mongodb-org
  - if nc -z localhost 27017; then sudo service mongod stop; fi
  - sudo pip install mongo-orchestration
  - sudo mongo-orchestration start

before_script:
  - curl -XPUT http://localhost:8889/v1/sharded_clusters/myCluster --data @tests/sharded.json
  - composer self-update
  - if [[ ${TRAVIS_PHP_VERSION:0:2} == "5." ]]; then yes '' | pecl -q install -f mongo-${DRIVER_VERSION}; fi
  - if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then pecl install -f mongodb-${DRIVER_VERSION}; fi
  - if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then composer require "alcaeus/mongo-php-adapter=${ADAPTER_VERSION}" --ignore-platform-reqs; fi
  - composer update ${COMPOSER_FLAGS}

script:
  - ./vendor/bin/phpunit --coverage-clover=coverage.clover

after_script:
    - wget https://scrutinizer-ci.com/ocular.phar
    - php ocular.phar code-coverage:upload --format=php-clover coverage.clover

{'fraction_non_alphanumeric': 0.1575081610446137, 'fraction_numerical': 0.029923830250272034, 'mean_word_length': 3.562034739454094, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '6360497', 'n_tokens_mistral': 1531, 'n_tokens_neox': 1416, 'n_words': 256}