Skip to content

Commit ab46b38

Browse files
committed
[12.x] Separate workflow for Redis integration tests
1 parent cafe1ac commit ab46b38

File tree

1 file changed

+0
-107
lines changed

1 file changed

+0
-107
lines changed

.github/workflows/queues.yml

Lines changed: 0 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -82,113 +82,6 @@ jobs:
8282
DB_CONNECTION: sqlite
8383
QUEUE_CONNECTION: database
8484

85-
redis:
86-
runs-on: ubuntu-24.04
87-
88-
services:
89-
redis:
90-
image: redis:7.0
91-
ports:
92-
- 6379:6379
93-
options: --entrypoint redis-server
94-
95-
strategy:
96-
fail-fast: true
97-
matrix:
98-
client: ['phpredis', 'predis']
99-
100-
name: Redis (${{ matrix.client}}) Driver
101-
102-
steps:
103-
- name: Checkout code
104-
uses: actions/checkout@v4
105-
106-
- name: Setup PHP
107-
uses: shivammathur/setup-php@v2
108-
with:
109-
php-version: 8.2
110-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql, :php-psr
111-
tools: composer:v2
112-
coverage: none
113-
114-
- name: Set Framework version
115-
run: composer config version "12.x-dev"
116-
117-
- name: Install dependencies
118-
uses: nick-fields/retry@v3
119-
with:
120-
timeout_minutes: 5
121-
max_attempts: 5
122-
command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress
123-
124-
- name: Execute tests
125-
run: vendor/bin/phpunit tests/Integration/Queue
126-
env:
127-
REDIS_CLIENT: ${{ matrix.client }}
128-
QUEUE_CONNECTION: redis
129-
130-
redis-cluster:
131-
runs-on: ubuntu-24.04
132-
133-
strategy:
134-
fail-fast: true
135-
matrix:
136-
client: ['phpredis', 'predis']
137-
138-
name: Redis Cluster (${{ matrix.client}}) Driver
139-
140-
steps:
141-
- name: Checkout code
142-
uses: actions/checkout@v4
143-
144-
- name: Setup PHP
145-
uses: shivammathur/setup-php@v2
146-
with:
147-
php-version: 8.2
148-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql, :php-psr
149-
tools: composer:v2
150-
coverage: none
151-
152-
- name: Set Framework version
153-
run: composer config version "12.x-dev"
154-
155-
- name: Install dependencies
156-
uses: nick-fields/retry@v3
157-
with:
158-
timeout_minutes: 5
159-
max_attempts: 5
160-
command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress
161-
162-
- name: Create Redis Cluster
163-
run: |
164-
sudo apt update
165-
sudo apt-get install -y --fix-missing redis-server
166-
sudo service redis-server stop
167-
redis-server --daemonize yes --port 7000 --appendonly yes --cluster-enabled yes --cluster-config-file nodes-7000.conf
168-
redis-server --daemonize yes --port 7001 --appendonly yes --cluster-enabled yes --cluster-config-file nodes-7001.conf
169-
redis-server --daemonize yes --port 7002 --appendonly yes --cluster-enabled yes --cluster-config-file nodes-7002.conf
170-
redis-cli --cluster create 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 --cluster-replicas 0 --cluster-yes
171-
172-
- name: Check Redis Cluster is ready
173-
uses: nick-fields/retry@v3
174-
with:
175-
timeout_seconds: 5
176-
max_attempts: 5
177-
retry_wait_seconds: 5
178-
retry_on: error
179-
command: |
180-
redis-cli -c -h 127.0.0.1 -p 7000 cluster info | grep "cluster_state:ok"
181-
redis-cli -c -h 127.0.0.1 -p 7001 cluster info | grep "cluster_state:ok"
182-
redis-cli -c -h 127.0.0.1 -p 7002 cluster info | grep "cluster_state:ok"
183-
184-
- name: Execute tests
185-
run: vendor/bin/phpunit tests/Integration/Queue
186-
env:
187-
REDIS_CLIENT: ${{ matrix.client }}
188-
REDIS_CLUSTER_HOSTS_AND_PORTS: 127.0.0.1:7000,127.0.0.1:7001,127.0.0.1:7002
189-
REDIS_QUEUE: '{default}'
190-
QUEUE_CONNECTION: redis
191-
19285
beanstalkd:
19386
runs-on: ubuntu-24.04
19487

0 commit comments

Comments
 (0)