Skip to content

Commit

Permalink
Queue Integration Tests with Redis Cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
vadimonus committed Feb 5, 2025
1 parent 4c606d8 commit c5d4b1e
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/queues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,54 @@ jobs:
REDIS_CLIENT: ${{ matrix.client }}
QUEUE_CONNECTION: redis

redis-cluster:
runs-on: ubuntu-24.04

strategy:
fail-fast: true
matrix:
client: ['phpredis', 'predis']

name: Redis Cluster (${{ matrix.client}}) Driver

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql, :php-psr
tools: composer:v2
coverage: none

- name: Set Framework version
run: composer config version "11.x-dev"

- name: Install dependencies
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress

- name: Create Redis Cluster
run: |
sudo apt-get install -y redis-server
sudo service redis-server stop
redis-server --daemonize yes --port 7000 --appendonly yes --cluster-enabled yes --cluster-config-file nodes-7000.conf
redis-server --daemonize yes --port 7001 --appendonly yes --cluster-enabled yes --cluster-config-file nodes-7001.conf
redis-server --daemonize yes --port 7002 --appendonly yes --cluster-enabled yes --cluster-config-file nodes-7002.conf
redis-cli --cluster create 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 --cluster-replicas 0 --cluster-yes
- name: Execute tests
run: vendor/bin/phpunit tests/Integration/Queue
env:
REDIS_CLIENT: ${{ matrix.client }}
REDIS_CLUSTER_HOSTS_AND_PORTS: 127.0.0.1:7000,127.0.0.1:7001,127.0.0.1:7002
REDIS_QUEUE: '{default}'

beanstalkd:
runs-on: ubuntu-24.04

Expand Down

0 comments on commit c5d4b1e

Please sign in to comment.