-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Trial turning off xdebug * Remove composer `--dev` warning * Add composer cache * Add badges to README * Add php 7.2 * Using --prefer-lowest means we need to polyfill phpunit 5.0 test case class * Trial running travis with lowest dependencies * Check folder structure - to be removed * Do not need that many lowest deps builds * Remove debug line * Not using mongodb in these tests * Move to simpler bash test for existence * Attempt to fix the composer update error * Trial with ignore platform reqs for composer pre-build * Remove accidentally committed composer change * Move pre-run composer update * Move pre-run composer update comment * Prefer dist for all composer calls * Fix php7.2 lowest dependencies build * Add comment making it obvious php mongodb adapter is pinned to lowest
- Loading branch information
Showing
4 changed files
with
41 additions
and
7 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,21 +1,37 @@ | ||
sudo: false | ||
language: php | ||
sudo: false | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace PHPUnit\Framework; | ||
|
||
$class = 'PHPUnit\Framework\TestCase'; | ||
|
||
if (!class_exists($class)) { | ||
|
||
abstract class TestCase extends \PHPUnit_Framework_TestCase | ||
{ | ||
} | ||
} |
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