Skip to content

Commit

Permalink
Execute docker dependent tests with github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jakzal committed May 4, 2020
1 parent 751b1e0 commit a270c64
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions Tests/Store/MemcachedStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* @author Jérémy Derussé <[email protected]>
*
* @requires extension memcached
* @group integration
*/
class MemcachedStoreTest extends AbstractStoreTest
{
Expand Down
1 change: 1 addition & 0 deletions Tests/Store/PredisStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

/**
* @author Jérémy Derussé <[email protected]>
* @group integration
*/
class PredisStoreTest extends AbstractRedisStoreTest
{
Expand Down
8 changes: 5 additions & 3 deletions Tests/Store/RedisArrayStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @author Jérémy Derussé <[email protected]>
*
* @requires extension redis
* @group integration
*/
class RedisArrayStoreTest extends AbstractRedisStoreTest
{
Expand All @@ -23,9 +24,10 @@ public static function setUpBeforeClass(): void
if (!class_exists('RedisArray')) {
self::markTestSkipped('The RedisArray class is required.');
}
if (!@((new \Redis())->connect(getenv('REDIS_HOST')))) {
$e = error_get_last();
self::markTestSkipped($e['message']);
try {
(new \Redis())->connect(getenv('REDIS_HOST'));
} catch (\Exception $e) {
self::markTestSkipped($e->getMessage());
}
}

Expand Down
1 change: 1 addition & 0 deletions Tests/Store/RedisClusterStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @author Jérémy Derussé <[email protected]>
*
* @requires extension redis
* @group integration
*/
class RedisClusterStoreTest extends AbstractRedisStoreTest
{
Expand Down
8 changes: 5 additions & 3 deletions Tests/Store/RedisStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@
* @author Jérémy Derussé <[email protected]>
*
* @requires extension redis
* @group integration
*/
class RedisStoreTest extends AbstractRedisStoreTest
{
public static function setUpBeforeClass(): void
{
if (!@((new \Redis())->connect(getenv('REDIS_HOST')))) {
$e = error_get_last();
self::markTestSkipped($e['message']);
try {
(new \Redis())->connect(getenv('REDIS_HOST'));
} catch (\Exception $e) {
self::markTestSkipped($e->getMessage());
}
}

Expand Down

0 comments on commit a270c64

Please sign in to comment.