-
Notifications
You must be signed in to change notification settings - Fork 23
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 #21 from redthor/improvement/travis-build
Trial updated travis config from bundle
- Loading branch information
Showing
4 changed files
with
52 additions
and
25 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,25 +1,37 @@ | ||
sudo: false | ||
language: php | ||
sudo: false | ||
|
||
php: | ||
- 5.6 | ||
|
||
env: | ||
- MONGO_VERSION=stable | ||
cache: | ||
directories: | ||
- $HOME/.composer/cache/files | ||
|
||
matrix: | ||
include: | ||
# Test the latest | ||
- php: 5.6 | ||
env: MONGO_VERSION=stable | ||
- php: 7.1 | ||
env: ADAPTER_VERSION="^1.0.0" MONGODB_VERSION=stable | ||
- php: 7.2 | ||
env: ADAPTER_VERSION="^1.0.0" MONGODB_VERSION=stable | ||
|
||
services: mongodb | ||
# Test with the lowest deps | ||
- php: 5.6 | ||
env: MONGO_VERSION=stable COMPOSER_FLAGS="--prefer-stable --prefer-lowest --prefer-dist" | ||
- php: 7.2 | ||
# Note that the ADAPTER_VERSION is pinned to 1.0.0 when testing lowest deps | ||
env: ADAPTER_VERSION="1.0.0" MONGODB_VERSION=stable COMPOSER_FLAGS="--prefer-stable --prefer-lowest --prefer-dist" | ||
|
||
before_script: | ||
- if [ "x${MONGO_VERSION}" != "x" ]; then yes '' | pecl -q install -f mongo-${MONGO_VERSION}; fi | ||
- 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 | ||
# Not using code coverage | ||
- phpenv config-rm xdebug.ini | ||
- if ! [ -z "$MONGO_VERSION" ]; then yes '' | pecl -q install -f mongo-${MONGO_VERSION}; fi | ||
- if ! [ -z "$MONGODB_VERSION" ]; then pecl install -f mongodb-${MONGODB_VERSION}; fi | ||
- if ! [ -z "$ADAPTER_VERSION" ]; then composer require "alcaeus/mongo-php-adapter=${ADAPTER_VERSION}" --ignore-platform-reqs; fi | ||
- composer self-update | ||
- composer install --dev | ||
# To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 | ||
- if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --ignore-platform-reqs --quiet; fi | ||
- composer update -v ${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
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
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