From dc7ac57a3cd30424b59e12536bf4be2e8deabf94 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Mon, 4 May 2020 16:26:42 +0100 Subject: [PATCH] Configure services additionally required by the master branch --- .github/workflows/tests.yml | 58 ++++++++++++++++++- .../Adapter/CouchbaseBucketAdapterTest.php | 1 + .../Lock/Tests/Store/MongoDbStoreTest.php | 1 + .../Transport/AmazonSqsIntegrationTest.php | 3 + .../Tests/Caster/RdKafkaCasterTest.php | 1 + 5 files changed, 62 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7924d63c05..fd3a2ac1ea 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -40,19 +40,69 @@ jobs: image: rabbitmq:3.8.3 ports: - 5672:5672 + mongodb: + image: mongo + ports: + - 27017:27017 + couchbase: + image: couchbase:6.5.1 + ports: + - 8091:8091 + - 8092:8092 + - 8093:8093 + - 8094:8094 + - 11210:11210 + sqs: + image: asyncaws/testing-sqs + ports: + - 9494:9494 + zookeeper: + image: wurstmeister/zookeeper:3.4.6 + kafka: + image: wurstmeister/kafka:2.12-2.4.1 + ports: + - 9092:9092 + env: + KAFKA_AUTO_CREATE_TOPICS_ENABLE: false + KAFKA_CREATE_TOPICS: 'test-topic:1:1:compact' + KAFKA_ADVERTISED_HOST_NAME: localhost + KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181' + KAFKA_ADVERTISED_PORT: 9092 steps: - name: Checkout uses: actions/checkout@v2 + - name: Install system dependencies + run: | + echo "::group::add apt sources" + sudo wget -O - http://packages.couchbase.com/ubuntu/couchbase.key | sudo apt-key add - + echo "deb http://packages.couchbase.com/ubuntu bionic bionic/main" | sudo tee /etc/apt/sources.list.d/couchbase.list + echo "::endgroup::" + + echo "::group::apt-get update" + sudo apt-get update + echo "::endgroup::" + + echo "::group::install tools & libraries" + sudo apt-get install libcouchbase-dev librdkafka-dev + echo "::endgroup::" + + - name: Configure Couchbase + run: | + curl -s -u 'username=Administrator&password=111111' -X POST http://localhost:8091/node/controller/setupServices -d 'services=kv%2Cn1ql%2Cindex%2Cfts' + curl -s -X POST http://localhost:8091/settings/web -d 'username=Administrator&password=111111&port=SAME' + curl -s -u Administrator:111111 -X POST http://localhost:8091/pools/default/buckets -d 'ramQuotaMB=100&bucketType=ephemeral&name=cache' + curl -s -u Administrator:111111 -X POST http://localhost:8091/pools/default -d 'memoryQuota=256' + - name: Setup PHP uses: shivammathur/setup-php@v2 with: coverage: "none" - extensions: "memcached,redis,xsl" + extensions: "json,couchbase,memcached,mongodb,redis,rdkafka,xsl" ini-values: "memory_limit=-1" php-version: "${{ matrix.php }}" - tools: flex + tools: flex,pecl - name: Configure composer run: | @@ -89,7 +139,11 @@ jobs: REDIS_CLUSTER_HOSTS: 'localhost:7000 localhost:7001 localhost:7002 localhost:7003 localhost:7004 localhost:7005' MESSENGER_REDIS_DSN: redis://127.0.0.1:7006/messages MESSENGER_AMQP_DSN: amqp://localhost/%2f/messages + MESSENGER_SQS_DSN: "sqs://localhost:9494/messages?sslmode=disable&poll_timeout=0.01" + MESSENGER_SQS_FIFO_QUEUE_DSN: "sqs://localhost:9494/messages.fifo?sslmode=disable&poll_timeout=0.01" MEMCACHED_HOST: localhost + MONGODB_HOST: localhost + KAFKA_BROKER: localhost:9092 - name: Run HTTP push tests if: matrix.php == '7.4' diff --git a/src/Symfony/Component/Cache/Tests/Adapter/CouchbaseBucketAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/CouchbaseBucketAdapterTest.php index d93c74fc52..120d0d94c0 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/CouchbaseBucketAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/CouchbaseBucketAdapterTest.php @@ -17,6 +17,7 @@ use Symfony\Component\Cache\Adapter\CouchbaseBucketAdapter; /** * @requires extension couchbase 2.6.0 + * @group integration * * @author Antonio Jose Cerezo Aranda */ diff --git a/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreTest.php index 66411c4507..1eae5dda75 100644 --- a/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreTest.php @@ -23,6 +23,7 @@ use Symfony\Component\Lock\Store\MongoDbStore; * @author Joe Bennett * * @requires function \MongoDB\Client::__construct + * @group integration */ class MongoDbStoreTest extends AbstractStoreTest { diff --git a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/AmazonSqsIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/AmazonSqsIntegrationTest.php index 251c821a07..3c47be5614 100644 --- a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/AmazonSqsIntegrationTest.php +++ b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/AmazonSqsIntegrationTest.php @@ -16,6 +16,9 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Messenger\Bridge\AmazonSqs\Tests\Fixtures\DummyMessage; use Symfony\Component\Messenger\Bridge\AmazonSqs\Transport\Connection; +/** + * @group integration + */ class AmazonSqsIntegrationTest extends TestCase { public function testConnectionSendToFifoQueueAndGet(): void diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/RdKafkaCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/RdKafkaCasterTest.php index 58b268dbc8..6b449b367c 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/RdKafkaCasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/RdKafkaCasterTest.php @@ -20,6 +20,7 @@ use Symfony\Component\VarDumper\Test\VarDumperTestTrait; /** * @requires extension rdkafka + * @group integration */ class RdKafkaCasterTest extends TestCase {