Skip to content

Commit baf5395

Browse files
authored
Update alpine image (#55)
* Bump alpine version * Bump infection * Bump orbs * Makefile changes * Added missing covers annotation * Makefile changes Co-authored-by: Marko <[email protected]>
1 parent 5addccf commit baf5395

File tree

7 files changed

+24
-25
lines changed

7 files changed

+24
-25
lines changed

Diff for: .circleci/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
version: 2.1
22

33
orbs:
4-
ci-caching: jobcloud/ci-caching@0.12
5-
ci-php: jobcloud/ci-php@0.29
4+
ci-caching: jobcloud/ci-caching@1.0.2
5+
ci-php: jobcloud/ci-php@0.32
66

77
workflows:
88
test-php-kafka-lib:

Diff for: Makefile

+14-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: clean code-style coverage help test static-analysis update-dependencies pcov-enable pcov-disable infection-testing
1+
.PHONY: clean code-style coverage help test static-analysis install-dependencies install-dependencies-lowest update-dependencies pcov-enable pcov-disable infection-testing
22
.DEFAULT_GOAL := test
33

44
PHPUNIT = ./vendor/bin/phpunit -c ./phpunit.xml
@@ -38,6 +38,7 @@ infection-testing:
3838
cp -f build/logs/phpunit/junit.xml build/logs/phpunit/coverage/junit.xml
3939
sudo php-ext-disable pcov
4040
${INFECTION} --coverage=build/logs/phpunit/coverage --min-msi=91 --threads=`nproc`
41+
sudo php-ext-enable pcov
4142

4243
pcov-enable:
4344
sudo php-ext-enable pcov
@@ -50,14 +51,15 @@ help:
5051
# make <target> [OPTION=value]
5152
#
5253
# Targets:
53-
# clean Cleans the coverage and the vendor directory
54-
# code-style Check codestyle using phpcs
55-
# coverage Generate code coverage (html, clover)
56-
# help You're looking at it!
57-
# test (default) Run all the tests with phpunit
58-
# static-analysis Run static analysis using phpstan
59-
# infection-testing Run infection/mutation testing
60-
# install-dependencies Run composer install
61-
# update-dependencies Run composer update
62-
# pcov-enable Enable pcov
63-
# pcov-disable Disable pcov
54+
# clean Cleans the coverage and the vendor directory
55+
# code-style Check codestyle using phpcs
56+
# coverage Generate code coverage (html, clover)
57+
# help You're looking at it!
58+
# test (default) Run all the tests with phpunit
59+
# static-analysis Run static analysis using phpstan
60+
# infection-testing Run infection/mutation testing
61+
# install-dependencies Run composer install
62+
# install-dependencies-lowest Run composer install with --prefer-lowest
63+
# update-dependencies Run composer update
64+
# pcov-enable Enable pcov
65+
# pcov-disable Disable pcov

Diff for: composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"rregeer/phpunit-coverage-check": "^0.3.1",
3131
"johnkary/phpunit-speedtrap": "^3.1",
3232
"flix-tech/avro-serde-php": "^1.4",
33-
"infection/infection": "^0.20"
33+
"infection/infection": "^0.21"
3434
},
3535
"autoload": {
3636
"psr-4": {

Diff for: docker/dev/php/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:7.4-cli-alpine3.12
1+
FROM php:7.4-cli-alpine3.13
22

33
ARG HOST_USER_ID
44
ARG HOST_USER

Diff for: phpunit.xml

+2-7
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
convertWarningsToExceptions="true"
99
processIsolation="false"
1010
stopOnFailure="false"
11+
forceCoversAnnotation="true"
1112
bootstrap="tests/bootstrap.php"
12-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.4/phpunit.xsd">
13+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd">
1314
<coverage>
1415
<include>
1516
<directory>src</directory>
@@ -25,12 +26,6 @@
2526
<ini name="max_execution_time" value="-1"/>
2627
<ini name="html_errors" value="false"/>
2728
<ini name="memory_limit" value="2G"/>
28-
<ini name="xdebug.default_enable" value="1"/>
29-
<ini name="xdebug.enable_coverage" value="1"/>
30-
<ini name="xdebug.remote_autostart" value="0"/>
31-
<ini name="xdebug.remote_enable" value="0"/>
32-
<ini name="xdebug.overload_var_dump" value="0"/>
33-
<ini name="xdebug.show_mem_delta" value="0"/>
3429
</php>
3530
<testsuites>
3631
<testsuite name="Unit">

Diff for: tests/Unit/Callback/KafkaProducerDeliveryReportCallbackTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Jobcloud\Kafka\Callback\KafkaProducerDeliveryReportCallback;
1111

1212
/**
13-
* @ \Jobcloud\Kafka\Callback\KafkaProducerDeliveryReportCallback
13+
* @covers \Jobcloud\Kafka\Callback\KafkaProducerDeliveryReportCallback
1414
*/
1515
class KafkaProducerDeliveryReportCallbackTest extends TestCase
1616
{

Diff for: tests/Unit/Message/Encoder/JsonEncoderTest.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
use Jobcloud\Kafka\Message\KafkaProducerMessageInterface;
99
use PHPUnit\Framework\TestCase;
1010

11+
/**
12+
* @covers \Jobcloud\Kafka\Message\Encoder\JsonEncoder
13+
*/
1114
class JsonEncoderTest extends TestCase
1215
{
13-
1416
/**
1517
* @return void
1618
*/

0 commit comments

Comments
 (0)