diff --git a/.travis.yml b/.travis.yml index 3093c2b1d..5e18c3eac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,10 @@ matrix: - php: 7.1 services: docker env: SYMFONY_VERSION=3.3.* FUNCTIONAL_TESTS=true + allow_failures: + - php: 7.1 + services: docker + env: SYMFONY_VERSION=3.3.* RDKAFKA_TESTS=true cache: directories: @@ -44,13 +48,17 @@ install: - if [ "$FUNCTIONAL_TESTS" = true ]; then docker --version; fi - if [ "$FUNCTIONAL_TESTS" = true ]; then docker-compose --version; fi - if [ "$FUNCTIONAL_TESTS" = true ]; then bin/dev -b; fi + - if [ "$RDKAFKA_TESTS" = true ]; then docker --version; fi + - if [ "$RDKAFKA_TESTS" = true ]; then docker-compose --version; fi + - if [ "$RDKAFKA_TESTS" = true ]; then bin/dev -b; fi script: - if [ "$PHPSTAN" = true ]; then composer require "phpstan/phpstan:^0.8" ; php -d memory_limit=512M bin/phpstan analyse -l 1 -c phpstan.neon pkg/gps pkg/amqp-ext pkg/async-event-dispatcher pkg/dbal pkg/enqueue pkg/enqueue-bundle pkg/fs pkg/gearman pkg/job-queue pkg/null pkg/pheanstalk pkg/redis pkg/simple-client pkg/sqs pkg/stomp pkg/test pkg/rdkafka; fi - if [ "$PHP_CS_FIXER" = true ]; then IFS=$'\n'; COMMIT_SCA_FILES=($(git diff --name-only --diff-filter=ACMRTUXB "${TRAVIS_COMMIT_RANGE}")); unset IFS; fi - if [ "$PHP_CS_FIXER" = true ]; then ./bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --stop-on-violation --using-cache=no --path-mode=intersection -- "${COMMIT_SCA_FILES[@]}"; fi - if [ "$UNIT_TESTS" = true ]; then bin/phpunit --exclude-group=functional; fi - - if [ "$FUNCTIONAL_TESTS" = true ]; then bin/dev -t; fi + - if [ "$FUNCTIONAL_TESTS" = true ]; then bin/dev -t --exclude-group=rdkafka; fi + - if [ "RDKAFKA_TESTS" = true ]; then bin/dev -t --group=rdkafka; fi notifications: webhooks: diff --git a/bin/dev b/bin/dev index df04fee23..dd39b3d5f 100755 --- a/bin/dev +++ b/bin/dev @@ -21,7 +21,7 @@ while getopts "bustefcd" OPTION; do ./bin/php-cs-fixer fix ;; t) - COMPOSE_PROJECT_NAME=mqdev docker-compose run --workdir="/mqdev" --rm dev ./bin/test "$2" + COMPOSE_PROJECT_NAME=mqdev docker-compose run --workdir="/mqdev" --rm dev ./bin/test "$2" "$3" "$4" ;; c) COMPOSE_PROJECT_NAME=mqdev docker-compose run -e CHANGELOG_GITHUB_TOKEN=${CHANGELOG_GITHUB_TOKEN:-""} --workdir="/mqdev" --rm generate-changelog github_changelog_generator --future-release "$2" --simple-list diff --git a/pkg/rdkafka/Tests/JsonSerializerTest.php b/pkg/rdkafka/Tests/JsonSerializerTest.php index 2d9cb3451..6513a2257 100644 --- a/pkg/rdkafka/Tests/JsonSerializerTest.php +++ b/pkg/rdkafka/Tests/JsonSerializerTest.php @@ -8,6 +8,9 @@ use Enqueue\Test\ClassExtensionTrait; use PHPUnit\Framework\TestCase; +/** + * @group rdkafka + */ class JsonSerializerTest extends TestCase { use ClassExtensionTrait; diff --git a/pkg/rdkafka/Tests/RdKafkaConnectionFactoryTest.php b/pkg/rdkafka/Tests/RdKafkaConnectionFactoryTest.php index 1b765679c..5b7f82bfe 100644 --- a/pkg/rdkafka/Tests/RdKafkaConnectionFactoryTest.php +++ b/pkg/rdkafka/Tests/RdKafkaConnectionFactoryTest.php @@ -5,6 +5,9 @@ use Enqueue\RdKafka\RdKafkaConnectionFactory; use PHPUnit\Framework\TestCase; +/** + * @group rdkafka + */ class RdKafkaConnectionFactoryTest extends TestCase { public function testThrowNeitherArrayStringNorNullGivenAsConfig() diff --git a/pkg/rdkafka/Tests/RdKafkaConsumerTest.php b/pkg/rdkafka/Tests/RdKafkaConsumerTest.php index 123c336c9..1fc654777 100644 --- a/pkg/rdkafka/Tests/RdKafkaConsumerTest.php +++ b/pkg/rdkafka/Tests/RdKafkaConsumerTest.php @@ -11,6 +11,9 @@ use RdKafka\KafkaConsumer; use RdKafka\Message; +/** + * @group rdkafka + */ class RdKafkaConsumerTest extends TestCase { public function testCouldBeConstructedWithRequiredArguments() diff --git a/pkg/rdkafka/Tests/RdKafkaContextTest.php b/pkg/rdkafka/Tests/RdKafkaContextTest.php index 4758e0bbd..f09c5be1e 100644 --- a/pkg/rdkafka/Tests/RdKafkaContextTest.php +++ b/pkg/rdkafka/Tests/RdKafkaContextTest.php @@ -9,6 +9,9 @@ use Interop\Queue\InvalidDestinationException; use PHPUnit\Framework\TestCase; +/** + * @group rdkafka + */ class RdKafkaContextTest extends TestCase { public function testThrowNotImplementedOnCreateTemporaryQueue() diff --git a/pkg/rdkafka/Tests/RdKafkaMessageTest.php b/pkg/rdkafka/Tests/RdKafkaMessageTest.php index 9bcc34642..c2e5c224a 100644 --- a/pkg/rdkafka/Tests/RdKafkaMessageTest.php +++ b/pkg/rdkafka/Tests/RdKafkaMessageTest.php @@ -6,6 +6,9 @@ use PHPUnit\Framework\TestCase; use RdKafka\Message; +/** + * @group rdkafka + */ class RdKafkaMessageTest extends TestCase { public function testCouldSetGetPartition() diff --git a/pkg/rdkafka/Tests/RdKafkaProducerTest.php b/pkg/rdkafka/Tests/RdKafkaProducerTest.php index 8a9ee1588..085f6a850 100644 --- a/pkg/rdkafka/Tests/RdKafkaProducerTest.php +++ b/pkg/rdkafka/Tests/RdKafkaProducerTest.php @@ -15,6 +15,9 @@ use RdKafka\ProducerTopic; use RdKafka\TopicConf; +/** + * @group rdkafka + */ class RdKafkaProducerTest extends TestCase { public function testCouldBeConstructedWithKafkaProducerAndSerializerAsArguments() diff --git a/pkg/rdkafka/Tests/RdKafkaTopicTest.php b/pkg/rdkafka/Tests/RdKafkaTopicTest.php index 4c9ebe47f..f81e4cd38 100644 --- a/pkg/rdkafka/Tests/RdKafkaTopicTest.php +++ b/pkg/rdkafka/Tests/RdKafkaTopicTest.php @@ -6,6 +6,9 @@ use PHPUnit\Framework\TestCase; use RdKafka\TopicConf; +/** + * @group rdkafka + */ class RdKafkaTopicTest extends TestCase { public function testCouldSetGetPartition() diff --git a/pkg/rdkafka/Tests/Spec/RdKafkaConnectionFactoryTest.php b/pkg/rdkafka/Tests/Spec/RdKafkaConnectionFactoryTest.php index b0ee68ff8..1132e3930 100644 --- a/pkg/rdkafka/Tests/Spec/RdKafkaConnectionFactoryTest.php +++ b/pkg/rdkafka/Tests/Spec/RdKafkaConnectionFactoryTest.php @@ -5,6 +5,9 @@ use Enqueue\RdKafka\RdKafkaConnectionFactory; use Interop\Queue\Spec\PsrConnectionFactorySpec; +/** + * @group rdkafka + */ class RdKafkaConnectionFactoryTest extends PsrConnectionFactorySpec { protected function createConnectionFactory() diff --git a/pkg/rdkafka/Tests/Spec/RdKafkaContextTest.php b/pkg/rdkafka/Tests/Spec/RdKafkaContextTest.php index d17fac509..c99c9f051 100644 --- a/pkg/rdkafka/Tests/Spec/RdKafkaContextTest.php +++ b/pkg/rdkafka/Tests/Spec/RdKafkaContextTest.php @@ -5,6 +5,9 @@ use Enqueue\RdKafka\RdKafkaContext; use Interop\Queue\Spec\PsrContextSpec; +/** + * @group rdkafka + */ class RdKafkaContextTest extends PsrContextSpec { protected function createContext() diff --git a/pkg/rdkafka/Tests/Spec/RdKafkaMessageTest.php b/pkg/rdkafka/Tests/Spec/RdKafkaMessageTest.php index 2d311c2e0..6cff6667c 100644 --- a/pkg/rdkafka/Tests/Spec/RdKafkaMessageTest.php +++ b/pkg/rdkafka/Tests/Spec/RdKafkaMessageTest.php @@ -5,6 +5,9 @@ use Enqueue\RdKafka\RdKafkaMessage; use Interop\Queue\Spec\PsrMessageSpec; +/** + * @group rdkafka + */ class RdKafkaMessageTest extends PsrMessageSpec { /** diff --git a/pkg/rdkafka/Tests/Spec/RdKafkaQueueTest.php b/pkg/rdkafka/Tests/Spec/RdKafkaQueueTest.php index 2bb16adc7..e6bf40156 100644 --- a/pkg/rdkafka/Tests/Spec/RdKafkaQueueTest.php +++ b/pkg/rdkafka/Tests/Spec/RdKafkaQueueTest.php @@ -5,6 +5,9 @@ use Enqueue\RdKafka\RdKafkaTopic; use Interop\Queue\Spec\PsrQueueSpec; +/** + * @group rdkafka + */ class RdKafkaQueueTest extends PsrQueueSpec { protected function createQueue() diff --git a/pkg/rdkafka/Tests/Spec/RdKafkaSendToAndReceiveFromTopicTest.php b/pkg/rdkafka/Tests/Spec/RdKafkaSendToAndReceiveFromTopicTest.php index 3f94a14b6..05b5abfe2 100644 --- a/pkg/rdkafka/Tests/Spec/RdKafkaSendToAndReceiveFromTopicTest.php +++ b/pkg/rdkafka/Tests/Spec/RdKafkaSendToAndReceiveFromTopicTest.php @@ -7,6 +7,7 @@ use Interop\Queue\Spec\SendToAndReceiveFromTopicSpec; /** + * @group rdkafka * @group functional * @retry 5 */ diff --git a/pkg/rdkafka/Tests/Spec/RdKafkaTopicTest.php b/pkg/rdkafka/Tests/Spec/RdKafkaTopicTest.php index 86e290b4c..a5c61ade9 100644 --- a/pkg/rdkafka/Tests/Spec/RdKafkaTopicTest.php +++ b/pkg/rdkafka/Tests/Spec/RdKafkaTopicTest.php @@ -5,6 +5,9 @@ use Enqueue\RdKafka\RdKafkaTopic; use Interop\Queue\Spec\PsrTopicSpec; +/** + * @group rdkafka + */ class RdKafkaTopicTest extends PsrTopicSpec { /**