Skip to content

Commit

Permalink
ci debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ostrolucky committed Sep 6, 2024
1 parent e5f5a90 commit e146f1c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
with:
fetch-depth: 2
- name: "Install requirements"
Expand All @@ -47,7 +47,7 @@ jobs:
tools: "flex"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependency-versions }}"

Expand Down
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
redis: sh -c 'cp .github/workflows/redis-configs/redis.conf /tmp/ && redis-server /tmp/redis.conf --port 6379'
redis-acl: sh -c 'cp .github/workflows/redis-configs/redis-acl.conf /tmp/ && redis-server /tmp/redis-acl.conf --port 7099'
redis-sentinel: sh -c 'cp .github/workflows/redis-configs/redis-sentinel.conf /tmp/ && redis-server /tmp/redis-sentinel.conf --sentinel'
redis-sentinel: sh -c 'cp .github/workflows/redis-configs/redis-sentinel.conf /tmp/ && redis-server /tmp/redis-sentinel.conf --sentinel 2>/tmp/sentinel-log'
redis-node1: sh -c 'cp -R .github/workflows/redis-configs/redis-node1 /tmp/ && cd /tmp/redis-node1 && redis-server redis.conf --port 7079'
redis-node2: sh -c 'cp -R .github/workflows/redis-configs/redis-node2 /tmp/ && cd /tmp/redis-node2 && redis-server redis.conf --port 7080'
redis-node3: sh -c 'cp -R .github/workflows/redis-configs/redis-node3 /tmp/ && cd /tmp/redis-node3 && redis-server redis.conf --port 7081'
Expand Down
1 change: 1 addition & 0 deletions src/Factory/PhpredisClientFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ private function createClientFromSentinel(string $class, array $dsns, string $al

$address = $sentinel->getMasterAddrByName($masterName);
} catch (RedisException | RelayException $e) {
var_dump(file_get_contents('/tmp/sentinel-log'));

Check failure on line 149 in src/Factory/PhpredisClientFactory.php

View workflow job for this annotation

GitHub Actions / Static Analysis with Psalm

ForbiddenCode

src/Factory/PhpredisClientFactory.php:149:17: ForbiddenCode: Unsafe var_dump (see https://psalm.dev/002)

Check failure on line 149 in src/Factory/PhpredisClientFactory.php

View workflow job for this annotation

GitHub Actions / Coding Standards

Function var_dump() should not be referenced via a fallback global name, but via a use statement.

Check failure on line 149 in src/Factory/PhpredisClientFactory.php

View workflow job for this annotation

GitHub Actions / Coding Standards

Function file_get_contents() should not be referenced via a fallback global name, but via a use statement.
continue;
}

Expand Down
5 changes: 4 additions & 1 deletion tests/Factory/PhpredisClientFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ public function testCreateSentinelConfig(
?string $sentinelUser,
?string $sentinelPassword
): void {
if (!@fsockopen('127.0.0.1', 26379)) {
$this->markTestSkipped(sprintf('The %s requires a redis sentinel instance', self::class));
}

$this->logger->method('debug')->with(...$this->withConsecutive(
[$this->stringContains('Executing command "CONNECT 127.0.0.1 6379 5 <null>')],
['Executing command "AUTH sncredis"'],
Expand All @@ -129,7 +133,6 @@ public function testCreateSentinelConfig(
$client = $factory->create(
$sentinelClass,
[

Check failure on line 135 in tests/Factory/PhpredisClientFactoryTest.php

View workflow job for this annotation

GitHub Actions / Coding Standards

Multi-line array contains a single value; use single-line array instead
'redis://undefined@localhost:55555', // unreachable instance
'redis://sncredis@localhost:26379',
],
[
Expand Down

0 comments on commit e146f1c

Please sign in to comment.