<commit_before>language: php

php:
  - 5.6

env:
  global:
    - DOCTRINE_MONGODB_SERVER=mongodb://localhost:27017
  matrix:
    - MONGO_VERSION=1.5.8
    - MONGO_VERSION=stable

matrix:
  include:
    - php: 7.0
      env: ADAPTER_VERSION="^1.0.0" MONGODB_VERSION=stable


services: mongodb

before_script:
  - if [ "x${MONGO_VERSION}" != "x" ]; then yes '' | pecl -q install -f mongo-${MONGO_VERSION} && echo "extension=mongo.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`; fi
  - sudo service mongodb stop
  - sudo pip install mongo-orchestration
  - sudo mongo-orchestration start
  - curl -XPUT http://localhost:8889/v1/sharded_clusters/myCluster --data @tests/sharded.json | python -m json.tool
  - composer self-update
  - if [ "x${MONGODB_VERSION}" != "x" ]; then pecl install -f mongodb-${MONGODB_VERSION}; fi
  - if [ "x${ADAPTER_VERSION}" != "x" ]; then composer require "alcaeus/mongo-php-adapter=${ADAPTER_VERSION}" --ignore-platform-reqs; fi
  - composer install --dev

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>Test against MongoDB 3.2 and 2.6<commit_after>sudo: required

language: php

php:
  - 5.6
  - 7.0

env:
  global:
    - DOCTRINE_MONGODB_SERVER="mongodb://localhost:27017"
    - KEY_SERVER="hkp://keyserver.ubuntu.com:80"
    - MONGO_REPO_URI="http://repo.mongodb.com/apt/ubuntu"
    - MONGO_REPO_TYPE="precise/mongodb-enterprise/"
    - SOURCES_LOC="/etc/apt/sources.list.d/mongodb.list"
    - DRIVER_VERSION="stable"
    - ADAPTER_VERSION="^1.0.0"
  matrix:
    - SERVER_VERSION="2.6"
    - SERVER_VERSION="3.2"

matrix:
  include:
    - php: 5.6
      env: DRIVER_VERSION="1.5.8" SERVER_VERSION="2.6"

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

install:
  - sudo apt-get install mongodb-enterprise
  - 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 | python -m json.tool
  - composer self-update
  - if [[ ${TRAVIS_PHP_VERSION:0:2} == "5." ]]; then yes '' | pecl -q install -f mongo-${DRIVER_VERSION} && echo "extension=mongo.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`; 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 install --dev

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.15687519847570658, 'fraction_numerical': 0.024769768180374723, 'mean_word_length': 3.4744318181818183, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '3564906', 'n_tokens_mistral': 1266, 'n_tokens_neox': 1181, 'n_words': 238}