Browse Source

fix travis tests

tags/2019.06^2
Philipp Holzer 3 months ago
parent
commit
e604b3239d
No account linked to committer's email address
5 changed files with 22 additions and 3 deletions
  1. 7
    3
      .travis.yml
  2. 4
    0
      .travis/apcu.ini
  3. 1
    0
      .travis/memcached.ini
  4. 1
    0
      .travis/redis.ini
  5. 9
    0
      tests/src/Core/Lock/APCuCacheLockDriverTest.php

+ 7
- 3
.travis.yml View File

@@ -19,7 +19,11 @@ before_script:
19 19
  - cp config/local-sample.config.php config/local.config.php
20 20
  - mysql -e 'CREATE DATABASE IF NOT EXISTS test;'
21 21
  - mysql -utravis test < database.sql
22
- - echo "extension=redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
23
- - echo "extension=memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
24
- - echo "apc.enable_cli = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
22
+ - pecl channel-update pecl.php.net
23
+ - pecl config-set preferred_state beta
24
+ - if [[ $TRAVIS_PHP_VERSION != "7.1" ]]; then echo yes | pecl upgrade apcu; fi
25
+ - if [[ $TRAVIS_PHP_VERSION != "7.1" ]]; then phpenv config-add .travis/apcu.ini; fi
26
+ - phpenv config-add .travis/redis.ini
27
+ - phpenv config-add .travis/memcached.ini
28
+
25 29
 after_success: bash <(curl -s https://codecov.io/bash)

+ 4
- 0
.travis/apcu.ini View File

@@ -0,0 +1,4 @@
1
+extension="apcu.so"
2
+
3
+apc.enabled = 1
4
+apc.enable_cli = 1

+ 1
- 0
.travis/memcached.ini View File

@@ -0,0 +1 @@
1
+extension="memcached.so"

+ 1
- 0
.travis/redis.ini View File

@@ -0,0 +1 @@
1
+extension="redis.so"

+ 9
- 0
tests/src/Core/Lock/APCuCacheLockDriverTest.php View File

@@ -8,6 +8,15 @@ use Friendica\Core\Lock\CacheLockDriver;
8 8
 
9 9
 class APCuCacheLockDriverTest extends LockTest
10 10
 {
11
+	protected function setUp()
12
+	{
13
+		if (!APCuCache::isAvailable()) {
14
+			$this->markTestSkipped('APCu is not available');
15
+		}
16
+
17
+		parent::setUp();
18
+	}
19
+
11 20
 	protected function getInstance()
12 21
 	{
13 22
 		return new CacheLockDriver(new APCuCache());

Loading…
Cancel
Save