Skip to content

Commit d32fa98

Browse files
authored
Release/1.1.1 (#6)
1 parent 745e0d6 commit d32fa98

File tree

6 files changed

+19
-18
lines changed

6 files changed

+19
-18
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: CI
22

33
on:
4-
push:
54
pull_request:
65

76
env:

Makefile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
1+
PHP_IMAGE = gustavofreze/php:8.3
12
DOCKER_RUN = docker run -u root --rm -it --network=tiny-blocks --name test-lib \
23
-v ${PWD}:/app \
34
-v ${PWD}/tests/Integration/Database/Migrations:/test-adm-migrations \
45
-v /var/run/docker.sock:/var/run/docker.sock \
5-
-w /app gustavofreze/php:8.3
6+
-w /app ${PHP_IMAGE}
67

7-
.PHONY: configure test unit-test test-no-coverage create-volume create-network review show-reports clean
8+
.PHONY: configure test unit-test test-no-coverage configure-test-environment review show-reports clean
89

9-
configure:
10+
configure: configure-test-environment
1011
@${DOCKER_RUN} composer update --optimize-autoloader
1112

12-
test: create-volume
13+
test: configure-test-environment
1314
@${DOCKER_RUN} composer tests
1415

1516
unit-test:
1617
@${DOCKER_RUN} composer run unit-test
1718

18-
test-no-coverage: create-volume
19+
test-no-coverage: configure-test-environment
1920
@${DOCKER_RUN} composer tests-no-coverage
2021

21-
create-network:
22-
@docker network create tiny-blocks
23-
24-
create-volume:
25-
@docker volume create test-adm-migrations
22+
configure-test-environment:
23+
@if ! docker network inspect tiny-blocks > /dev/null 2>&1; then \
24+
docker network create tiny-blocks > /dev/null 2>&1; \
25+
fi
26+
@docker volume create test-adm-migrations > /dev/null 2>&1
2627

2728
review:
2829
@${DOCKER_RUN} composer review

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@
5353
"ext-pdo": "*"
5454
},
5555
"scripts": {
56+
"test": "phpunit -d memory_limit=2G --configuration phpunit.xml tests",
5657
"phpcs": "phpcs --standard=PSR12 --extensions=php ./src",
5758
"phpmd": "phpmd ./src text phpmd.xml --suffixes php --ignore-violations-on-exit",
5859
"phpstan": "phpstan analyse -c phpstan.neon.dist --quiet --no-progress",
59-
"test": "phpunit --log-junit=report/coverage/junit.xml --coverage-xml=report/coverage/coverage-xml --coverage-html=report/coverage/coverage-html tests",
60-
"unit-test": "phpunit --no-coverage -c phpunit.xml --testsuite unit",
61-
"test-no-coverage": "phpunit --no-coverage",
60+
"unit-test": "phpunit --no-coverage --configuration phpunit.xml --testsuite unit",
61+
"test-no-coverage": "phpunit --configuration phpunit.xml --no-coverage tests",
6262
"review": [
6363
"@phpcs",
6464
"@phpmd",

phpunit.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@
2626

2727
<coverage>
2828
<report>
29+
<xml outputDirectory="report/coverage/coverage-xml"/>
30+
<html outputDirectory="report/coverage/coverage-html"/>
2931
<text outputFile="report/coverage.txt"/>
30-
<html outputDirectory="report/html/"/>
3132
<clover outputFile="report/coverage-clover.xml"/>
3233
</report>
3334
</coverage>
3435

3536
<logging>
36-
<junit outputFile="report/execution-result.xml"/>
37+
<junit outputFile="report/coverage/junit.xml"/>
3738
</logging>
3839

3940
</phpunit>

src/Internal/Containers/Models/Address/Ports.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace TinyBlocks\DockerContainer\Internal\Containers\Models\Address;
66

77
use TinyBlocks\Collection\Collection;
8-
use TinyBlocks\Collection\Internal\Operations\Transform\PreserveKeys;
8+
use TinyBlocks\Collection\PreserveKeys;
99
use TinyBlocks\DockerContainer\Contracts\Ports as ContainerPorts;
1010

1111
final readonly class Ports implements ContainerPorts

tests/Integration/DockerContainerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function testMultipleContainersAreRunSuccessfully(): void
7171
/** @When the Flyway container runs the migration commands */
7272
$flywayContainer = $flywayContainer->run(
7373
commands: ['-connectRetries=15', 'clean', 'migrate'],
74-
waitAfterStarted: ContainerWaitForTime::forSeconds(seconds: 5)
74+
waitAfterStarted: ContainerWaitForTime::forSeconds(seconds: 7)
7575
);
7676

7777
self::assertNotEmpty($flywayContainer->getName());

0 commit comments

Comments
 (0)