fix travis tests
This commit is contained in:
parent
3ca8fa0e00
commit
e604b3239d
5 changed files with 22 additions and 3 deletions
10
.travis.yml
10
.travis.yml
|
@ -19,7 +19,11 @@ before_script:
|
||||||
- cp config/local-sample.config.php config/local.config.php
|
- cp config/local-sample.config.php config/local.config.php
|
||||||
- mysql -e 'CREATE DATABASE IF NOT EXISTS test;'
|
- mysql -e 'CREATE DATABASE IF NOT EXISTS test;'
|
||||||
- mysql -utravis test < database.sql
|
- mysql -utravis test < database.sql
|
||||||
- echo "extension=redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
- pecl channel-update pecl.php.net
|
||||||
- echo "extension=memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
- pecl config-set preferred_state beta
|
||||||
- echo "apc.enable_cli = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
- 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)
|
after_success: bash <(curl -s https://codecov.io/bash)
|
||||||
|
|
4
.travis/apcu.ini
Normal file
4
.travis/apcu.ini
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
extension="apcu.so"
|
||||||
|
|
||||||
|
apc.enabled = 1
|
||||||
|
apc.enable_cli = 1
|
1
.travis/memcached.ini
Normal file
1
.travis/memcached.ini
Normal file
|
@ -0,0 +1 @@
|
||||||
|
extension="memcached.so"
|
1
.travis/redis.ini
Normal file
1
.travis/redis.ini
Normal file
|
@ -0,0 +1 @@
|
||||||
|
extension="redis.so"
|
|
@ -8,6 +8,15 @@ use Friendica\Core\Lock\CacheLockDriver;
|
||||||
|
|
||||||
class APCuCacheLockDriverTest extends LockTest
|
class APCuCacheLockDriverTest extends LockTest
|
||||||
{
|
{
|
||||||
|
protected function setUp()
|
||||||
|
{
|
||||||
|
if (!APCuCache::isAvailable()) {
|
||||||
|
$this->markTestSkipped('APCu is not available');
|
||||||
|
}
|
||||||
|
|
||||||
|
parent::setUp();
|
||||||
|
}
|
||||||
|
|
||||||
protected function getInstance()
|
protected function getInstance()
|
||||||
{
|
{
|
||||||
return new CacheLockDriver(new APCuCache());
|
return new CacheLockDriver(new APCuCache());
|
||||||
|
|
Loading…
Reference in a new issue