Skip to content
This repository has been archived by the owner on Nov 11, 2020. It is now read-only.

Commit

Permalink
Merge pull request #301 from alcaeus/test-php-7.2
Browse files Browse the repository at this point in the history
Test against PHP 7.2
  • Loading branch information
alcaeus authored Aug 7, 2017
2 parents 7dde2cf + 547729e commit 485ccf0
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 24 deletions.
69 changes: 46 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,65 @@
sudo: required
dist: trusty
sudo: false
language: php

php:
- 5.6
- 7.0
- 7.1
services:
- mongodb

env:
global:
- 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"
- SERVER_VERSION="3.2"

matrix:
fast_finish: true
include:
- php: 5.6
env: DRIVER_VERSION="1.5.8" SERVER_VERSION="2.6" PREFER_LOWEST="--prefer-lowest"

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
- sleep 1
- if ! nc -z localhost 27017; then sudo service mongod start; fi
env: DRIVER_VERSION="1.6.7" COMPOSER_FLAGS="--prefer-lowest"
addons:
apt:
sources:
- sourceline: "deb [arch=amd64] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse"
key_url: "https://www.mongodb.org/static/pgp/server-3.0.asc"
- "mongodb-upstart"
packages: ['mongodb-org-server']
- php: 5.6
addons:
apt:
sources:
- sourceline: "deb [arch=amd64] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 multiverse"
key_url: "https://www.mongodb.org/static/pgp/server-3.4.asc"
- "mongodb-upstart"
packages: ['mongodb-org-server']
- php: 7.0
addons:
apt:
sources:
- sourceline: "deb [arch=amd64] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 multiverse"
key_url: "https://www.mongodb.org/static/pgp/server-3.4.asc"
- "mongodb-upstart"
packages: ['mongodb-org-server']
- php: 7.1
addons:
apt:
sources:
- sourceline: "deb [arch=amd64] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 multiverse"
key_url: "https://www.mongodb.org/static/pgp/server-3.4.asc"
- "mongodb-upstart"
packages: ['mongodb-org-server']
- php: 7.2
addons:
apt:
sources:
- sourceline: "deb [arch=amd64] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 multiverse"
key_url: "https://www.mongodb.org/static/pgp/server-3.4.asc"
- "mongodb-upstart"
packages: ['mongodb-org-server']

before_script:
- 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 ${PREFER_LOWEST}
- composer update ${COMPOSER_FLAGS}

script:
- ./vendor/bin/phpunit
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"require": {
"php": "^5.6 || ^7.0",
"ext-mongo": "^1.5",
"ext-mongo": "^1.6.7",
"doctrine/common": "^2.2"
},
"require-dev": {
Expand Down

0 comments on commit 485ccf0

Please sign in to comment.