Skip to content

Commit e3db7bb

Browse files
committed
Add Redis support to CI workflow across all platforms
Updated matrix strategy to include Redis service for Linux and manual setup for Windows and macOS. Adjusted Redis configuration steps and improved setup consistency across platforms.
1 parent 5917cda commit e3db7bb

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

.github/workflows/continuous-integration.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,43 +26,55 @@ jobs:
2626
fail-fast: false
2727
matrix:
2828
include:
29-
# Ubuntu: Test all PHP versions
29+
# Ubuntu: Test all PHP versions with Redis service
3030
- os: ubuntu-latest
3131
php-version: "8.1"
3232
dependencies: highest
33+
redis: service
3334
- os: ubuntu-latest
3435
php-version: "8.2"
3536
dependencies: lowest
37+
redis: service
3638
- os: ubuntu-latest
3739
php-version: "8.2"
3840
dependencies: highest
41+
redis: service
3942
- os: ubuntu-latest
4043
php-version: "8.3"
4144
dependencies: lowest
45+
redis: service
4246
- os: ubuntu-latest
4347
php-version: "8.3"
4448
dependencies: highest
49+
redis: service
4550
- os: ubuntu-latest
4651
php-version: "8.4"
4752
dependencies: lowest
53+
redis: service
4854
- os: ubuntu-latest
4955
php-version: "8.4"
5056
dependencies: highest
57+
redis: service
5158
# Windows: Latest PHP only for CI speed
5259
- os: windows-latest
5360
php-version: "8.4"
5461
dependencies: lowest
62+
redis: manual
5563
- os: windows-latest
5664
php-version: "8.4"
5765
dependencies: highest
66+
redis: manual
5867
# macOS: Latest PHP only for CI speed
5968
- os: macos-latest
6069
php-version: "8.4"
6170
dependencies: lowest
71+
redis: manual
6272
- os: macos-latest
6373
php-version: "8.4"
6474
dependencies: highest
75+
redis: manual
6576

77+
# Redis service container only works on Linux runners
6678
services:
6779
redis:
6880
image: redis:7-alpine
@@ -81,7 +93,7 @@ jobs:
8193
- name: Setup Redis (Ubuntu)
8294
if: runner.os == 'Linux'
8395
run: |
84-
# Install redis-cli for connection verification
96+
# Use Redis service container - install client tools
8597
sudo apt-get update -qq
8698
sudo apt-get install -y redis-tools
8799
redis-cli -h localhost -p 6379 ping
@@ -90,21 +102,21 @@ jobs:
90102
if: runner.os == 'Windows'
91103
shell: powershell
92104
run: |
93-
# Quick Redis setup for CI testing
105+
# Manual Redis setup for Windows CI
94106
$ProgressPreference = "SilentlyContinue"
95107
Invoke-WebRequest -Uri "https://github.com/microsoftarchive/redis/releases/download/win-3.0.504/Redis-x64-3.0.504.zip" -OutFile "redis.zip"
96108
Expand-Archive "redis.zip" -DestinationPath "redis"
97109
Start-Process -FilePath "redis/redis-server.exe" -WindowStyle Hidden
98-
Start-Sleep -Seconds 8
110+
Start-Sleep -Seconds 10
99111
redis/redis-cli.exe ping
100112
101113
- name: Setup Redis (macOS)
102114
if: runner.os == 'macOS'
103115
run: |
104-
# Fast Redis setup for CI
116+
# Manual Redis setup for macOS CI
105117
brew install redis
106118
brew services start redis
107-
sleep 5
119+
sleep 8
108120
redis-cli ping
109121
110122
- name: Setup PHP ${{ matrix.php-version }}

0 commit comments

Comments
 (0)