This repository has been archived by the owner on Nov 11, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #301 from alcaeus/test-php-7.2
Test against PHP 7.2
- Loading branch information
Showing
2 changed files
with
47 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters