Skip to content

Commit 0304b66

Browse files
committed
removed the env variables from the ci.yml file
1 parent ae48857 commit 0304b66

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ jobs:
3737
- name: Install dependencies
3838
run: composer install --no-progress --prefer-dist
3939

40-
- name: Set up environment variables from secrets
41-
run: |
42-
echo "NEO4J_ADDRESS=${{ secrets.NEO4J_ADDRESS }}" >> $GITHUB_ENV
43-
echo "NEO4J_USERNAME=${{ secrets.NEO4J_USERNAME }}" >> $GITHUB_ENV
44-
echo "NEO4J_PASSWORD=${{ secrets.NEO4J_PASSWORD }}" >> $GITHUB_ENV
40+
4541

4642
- name: Run Tests without phpunit.xml
4743
run: vendor/bin/phpunit --configuration phpunit.dist.xml

phpunit.dist.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
<log type="testdox" target="php://stdout" />
1414
</logging>
1515
-->
16-
16+
<php>
17+
<env name="NEO4J_ADDRESS" value="$_ENV['NEO4J_ADDRESS']" />
18+
<env name="NEO4J_USERNAME" value="$_ENV['NEO4J_USERNAME']" />
19+
<env name="NEO4J_PASSWORD" value="$_ENV['NEO4J_PASSWORD']" />
20+
</php>
1721
<!-- No need to set sensitive information here -->
1822
</phpunit>

src/Neo4jQueryAPI.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Neo4j\QueryAPI;
44

55
use GuzzleHttp\Client;
6+
use GuzzleHttp\Exception\GuzzleException;
67
use GuzzleHttp\Exception\RequestException;
78
use RuntimeException;
89
use stdClass;
@@ -31,6 +32,9 @@ public static function login(string $address, string $username, string $password
3132
return new self($client);
3233
}
3334

35+
/**
36+
* @throws GuzzleException
37+
*/
3438
public function run(string $cypher, array $parameters, string $database = 'neo4j'): array
3539
{
3640
$payload = [

tests/Integration/Neo4jQueryAPIIntegrationTest1.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ public static function queryProvider(): array
7373
],
7474
];
7575
}
76-
}
76+
}

tests/Integration/Neo4jQueryAPIIntegrationTest3.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static function setUpBeforeClass(): void
3232

3333
private static function clearDatabase(Neo4jQueryAPI $api): void
3434
{
35-
$api->run('MATCH (n) DETACH DELETE n' ,[]);
35+
$api->run('MATCH (n) DETACH DELETE n',[]);
3636
}
3737

3838
private static function createConstraints(Neo4jQueryAPI $api): void

0 commit comments

Comments
 (0)