Skip to content

Commit

Permalink
Merge pull request #31 from KonstantinCodes/feature/fix-actions
Browse files Browse the repository at this point in the history
Upgrade Tests to PHP 8
  • Loading branch information
KonstantinCodes authored May 3, 2021
2 parents 864c97c + 4671ca9 commit 6bacce4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
kafka:
image: lensesio/fast-data-dev
env:
ADV_HOST: 127.0.0.1
SAMPLEDATA: 0
RUNTESTS: 0
FORWARDLOGS: 0
Expand All @@ -33,15 +34,12 @@ jobs:

- name: Install rdkafka
run:
wget -O confluent_archive.key https://packages.confluent.io/deb/6.0/archive.key &&
sudo apt-key add confluent_archive.key &&
sudo add-apt-repository "deb [arch=amd64] https://packages.confluent.io/deb/6.0 stable main" &&
sudo apt update && sudo apt install netcat librdkafka1 librdkafka-dev kafkacat
sudo add-apt-repository universe && sudo apt update && sudo apt install netcat librdkafka1 librdkafka-dev

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: '8.0'
coverage: xdebug
tools: pecl, phpunit
extensions: rdkafka
Expand All @@ -66,6 +64,8 @@ jobs:
- name: Wait for Kafka
run: .github/workflows/wait-for-kafka.sh

- name: Unit Tests
run: ./vendor/bin/simple-phpunit --log-junit results/tests/junit.xml

#- name: try to produce
# run: echo "test" > testfile.json && kafkacat -b 0.0.0.0:9092 -t kafkacat_test -P testfile.json
Expand Down
3 changes: 2 additions & 1 deletion tests/Functional/KafkaTransportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

class KafkaTransportTest extends TestCase
{
private const BROKER = 'localhost:9092';
private const BROKER = '127.0.0.1:9092';
private const TOPIC_NAME = 'test_topic';

/** @var KafkaTransportFactory */
Expand Down Expand Up @@ -71,6 +71,7 @@ public function testSendAndReceive(SerializerInterface $serializer, Closure $dec
self::BROKER,
[
'flushTimeout' => 5000,
'flushRetries' => 5,
'topic' => [
'name' => $this->getTopicName(),
],
Expand Down

0 comments on commit 6bacce4

Please sign in to comment.