Skip to content

Commit b99efba

Browse files
committed
chore: Adds macOS CI pipeline to GitHub Actions workflow
Extends continuous integration coverage by adding a dedicated macOS job that mirrors the existing Windows and Linux test environments. Installs Redis via Homebrew and configures multiple .NET versions (6.0, 8.0, 9.0) to ensure cross-platform compatibility and comprehensive test coverage across different operating systems.
1 parent cf8b6fb commit b99efba

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/CI.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,41 @@ jobs:
143143
name: Tests Results - Windows Server 2022
144144
path: 'test-results/*.trx'
145145
reporter: dotnet-trx
146+
147+
macos:
148+
name: StackExchange.Redis (macOS)
149+
runs-on: macos-latest
150+
env:
151+
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: "1" # Enable color output, even though the console output is redirected in Actions
152+
TERM: xterm # Enable color output in GitHub Actions
153+
steps:
154+
- name: Checkout code
155+
uses: actions/checkout@v4
156+
with:
157+
fetch-depth: 0 # Fetch the full history
158+
- name: Install Redis
159+
run: |
160+
brew install redis
161+
brew services start redis
162+
# Wait for Redis to start
163+
sleep 3
164+
# Verify Redis is running
165+
redis-cli ping
166+
- name: Install .NET SDK
167+
uses: actions/setup-dotnet@v3
168+
with:
169+
dotnet-version: |
170+
6.0.x
171+
8.0.x
172+
9.0.x
173+
- name: .NET Build
174+
run: dotnet build Build.csproj -c Release /p:CI=true
175+
- name: StackExchange.Redis.Tests
176+
run: dotnet test tests/StackExchange.Redis.Tests/StackExchange.Redis.Tests.csproj -c Release --logger trx --logger GitHubActions --results-directory ./test-results/ /p:CI=true
177+
- uses: dorny/test-reporter@v1
178+
continue-on-error: true
179+
if: success() || failure()
180+
with:
181+
name: Test Results - macOS
182+
path: 'test-results/*.trx'
183+
reporter: dotnet-trx

0 commit comments

Comments
 (0)