Skip to content

Commit c880e63

Browse files
committed
Execute docker dependent tests with github actions
1 parent ec5bd25 commit c880e63

6 files changed

+20
-0
lines changed

Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php

+5
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ protected function setUp(): void
4444
if (!\extension_loaded('redis')) {
4545
self::markTestSkipped('Extension redis required.');
4646
}
47+
try {
48+
(new \Redis())->connect(getenv('REDIS_HOST'));
49+
} catch (\Exception $e) {
50+
self::markTestSkipped($e->getMessage());
51+
}
4752

4853
$host = getenv('REDIS_HOST') ?: 'localhost';
4954

Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313

1414
use Predis\Client;
1515

16+
/**
17+
* @group integration
18+
*/
1619
class PredisClusterSessionHandlerTest extends AbstractRedisSessionHandlerTestCase
1720
{
1821
protected function createRedisClient(string $host): Client

Tests/Session/Storage/Handler/PredisSessionHandlerTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313

1414
use Predis\Client;
1515

16+
/**
17+
* @group integration
18+
*/
1619
class PredisSessionHandlerTest extends AbstractRedisSessionHandlerTestCase
1720
{
1821
protected function createRedisClient(string $host): Client

Tests/Session/Storage/Handler/RedisArraySessionHandlerTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler;
1313

14+
/**
15+
* @group integration
16+
*/
1417
class RedisArraySessionHandlerTest extends AbstractRedisSessionHandlerTestCase
1518
{
1619
/**

Tests/Session/Storage/Handler/RedisClusterSessionHandlerTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler;
1313

14+
/**
15+
* @group integration
16+
*/
1417
class RedisClusterSessionHandlerTest extends AbstractRedisSessionHandlerTestCase
1518
{
1619
public static function setUpBeforeClass(): void

Tests/Session/Storage/Handler/RedisSessionHandlerTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler;
1313

14+
/**
15+
* @group integration
16+
*/
1417
class RedisSessionHandlerTest extends AbstractRedisSessionHandlerTestCase
1518
{
1619
/**

0 commit comments

Comments
 (0)