Skip to content

Commit

Permalink
Update Configs
Browse files Browse the repository at this point in the history
  • Loading branch information
RamiiYoussef committed Feb 28, 2024
1 parent 67c18d6 commit 343f43a
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 46 deletions.
86 changes: 43 additions & 43 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,63 +4,63 @@ on:
push:
pull_request:
schedule:
- cron: '0 4 * * *'
- cron: '0 4 * * *'

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.1, 8.2]
laravel: [10.*]
phpunit: [9.6]
dependency-version: [prefer-stable]
php: [ 8.1, 8.2 ]
laravel: [ 10.* ]
phpunit: [ 9.6 ]
dependency-version: [ prefer-stable ]
include:
- laravel: 10.*
php: 8.2
phpunit: 9.6
dependency-version: prefer-stable
- laravel: 9.*
php: 8.1
phpunit: 9.6
dependency-version: prefer-stable
- laravel: 10.*
php: 8.2
phpunit: 9.6
dependency-version: prefer-stable
- laravel: 9.*
php: 8.1
phpunit: 9.6
dependency-version: prefer-stable

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v2

- name: Install Librdkafka
run: |
wget -qO - https://packages.confluent.io/deb/5.4/archive.key | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.confluent.io/deb/5.4 stable main"
sudo apt-get update
sudo apt-get install librdkafka-dev
- name: Install Librdkafka
run: |
wget -qO - https://packages.confluent.io/deb/5.4/archive.key | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.confluent.io/deb/5.4 stable main"
sudo apt-get update
sudo apt-get install librdkafka-dev
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer, pecl
extensions: curl, libxml, mbstring, zip, bcmath, rdkafka
coverage: pcov
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer, pecl
extensions: curl, libxml, mbstring, zip, bcmath, rdkafka
coverage: pcov

- name: Install dependencies
run: |
composer remove phpro/grumphp --no-interaction --no-update --dev
composer require "laravel/framework:${{ matrix.laravel }}" "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
- name: Install dependencies
run: |
composer remove phpro/grumphp --no-interaction --no-update --dev
composer require "laravel/framework:${{ matrix.laravel }}" "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
- name: Execute Unit Tests
run: composer test -- --coverage-clover coverage/coverage.xml
# - name: Execute Unit Tests
# run: composer test -- --coverage-clover coverage/coverage.xml

#- name: Check PSR-12 Codestyle
# run: composer lint
#- name: Check PSR-12 Codestyle
# run: composer lint

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: RamiiYoussef/laravel-kafka
version: "v0.1.15"
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: RamiiYoussef/laravel-kafka
version: "v0.1.15"
1 change: 0 additions & 1 deletion src/Queue/Jobs/KafkaJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,4 @@ public function release($delay = 0)
$this->delete();
$this->kafkaQueue->release($delay, $this);
}

}
2 changes: 1 addition & 1 deletion src/Queue/KafkaFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

class KafkaFactory
{

//
}
9 changes: 8 additions & 1 deletion src/Queue/KafkaQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,14 @@ private function popNextJob(string $queue = null, string $firstRequeuedJobId = n
return null;
}

$job = new KafkaJob($this->container, $this, $message->payload, $message->topic_name, $message, $this->connectionName);
$job = new KafkaJob(
$this->container,
$this,
$message->payload,
$message->topic_name,
$message,
$this->connectionName
);

return $this->ensureJobCanBeProcessed($job, $queue, $firstRequeuedJobId);
}
Expand Down

0 comments on commit 343f43a

Please sign in to comment.