From: Philipp Holzer Date: Sat, 20 Apr 2019 16:11:24 +0000 (+0200) Subject: fix travis tests X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e604b3239d1c5e51a2e2fbda1a52557962b79b78;p=friendica.git fix travis tests --- diff --git a/.travis.yml b/.travis.yml index a241dff0fe..e2aa84f5c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,11 @@ before_script: - cp config/local-sample.config.php config/local.config.php - mysql -e 'CREATE DATABASE IF NOT EXISTS test;' - mysql -utravis test < database.sql - - echo "extension=redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - echo "extension=memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - echo "apc.enable_cli = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini + - pecl channel-update pecl.php.net + - pecl config-set preferred_state beta + - if [[ $TRAVIS_PHP_VERSION != "7.1" ]]; then echo yes | pecl upgrade apcu; fi + - if [[ $TRAVIS_PHP_VERSION != "7.1" ]]; then phpenv config-add .travis/apcu.ini; fi + - phpenv config-add .travis/redis.ini + - phpenv config-add .travis/memcached.ini + after_success: bash <(curl -s https://codecov.io/bash) diff --git a/.travis/apcu.ini b/.travis/apcu.ini new file mode 100644 index 0000000000..92598662cf --- /dev/null +++ b/.travis/apcu.ini @@ -0,0 +1,4 @@ +extension="apcu.so" + +apc.enabled = 1 +apc.enable_cli = 1 \ No newline at end of file diff --git a/.travis/memcached.ini b/.travis/memcached.ini new file mode 100644 index 0000000000..c9a2ff0c9a --- /dev/null +++ b/.travis/memcached.ini @@ -0,0 +1 @@ +extension="memcached.so" \ No newline at end of file diff --git a/.travis/redis.ini b/.travis/redis.ini new file mode 100644 index 0000000000..ab995b8374 --- /dev/null +++ b/.travis/redis.ini @@ -0,0 +1 @@ +extension="redis.so" \ No newline at end of file diff --git a/tests/src/Core/Lock/APCuCacheLockDriverTest.php b/tests/src/Core/Lock/APCuCacheLockDriverTest.php index 7b0137e368..6e185d6b9a 100644 --- a/tests/src/Core/Lock/APCuCacheLockDriverTest.php +++ b/tests/src/Core/Lock/APCuCacheLockDriverTest.php @@ -8,6 +8,15 @@ use Friendica\Core\Lock\CacheLockDriver; class APCuCacheLockDriverTest extends LockTest { + protected function setUp() + { + if (!APCuCache::isAvailable()) { + $this->markTestSkipped('APCu is not available'); + } + + parent::setUp(); + } + protected function getInstance() { return new CacheLockDriver(new APCuCache());