Skip to content

Commit d3eb957

Browse files
committed
Taking port from
1 parent 1405ced commit d3eb957

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,5 @@ jobs:
5454

5555
- name: Run tests
5656
run: vendor/bin/phpunit --coverage-text
57+
env:
58+
PORT: ${{ job.services.mysql.ports[3306] }}

phpunit.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@
1515
<directory suffix=".php">src/</directory>
1616
</include>
1717
</source>
18+
<php>
19+
<env name="PORT" value="3306"/>
20+
</php>
1821
</phpunit>

tests/Integration/BaseCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected function setUp(): void
4040
->withUser('root')
4141
->withHost('127.0.0.1')
4242
->withPassword('root')
43-
->withPort(3306)
43+
->withPort((int) $_ENV['PORT'])
4444
->withEventsIgnore($this->getIgnoredEvents());
4545

4646
$this->connect();

0 commit comments

Comments
 (0)