-
Notifications
You must be signed in to change notification settings - Fork 1.5k
96 lines (93 loc) · 4.79 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: CI
on:
pull_request:
push:
branches:
- main
paths:
- '*'
- '!/docs/*' # Don't run workflow when files are only in the /docs directory
jobs:
main:
name: StackExchange.Redis (Ubuntu)
runs-on: ubuntu-latest
env:
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: "1" # Enable color output, even though the console output is redirected in Actions
TERM: xterm # Enable color output in GitHub Actions
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Install .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
8.0.x
- name: .NET Build
run: dotnet build Build.csproj -c Release /p:CI=true
- name: Start Redis Services (docker-compose)
working-directory: ./tests/RedisConfigs
run: docker compose -f docker-compose.yml up -d --wait
- name: StackExchange.Redis.Tests
run: dotnet test tests/StackExchange.Redis.Tests/StackExchange.Redis.Tests.csproj -c Release --logger trx --logger GitHubActions --results-directory ./test-results/ /p:CI=true
- uses: dorny/test-reporter@v1
continue-on-error: true
if: success() || failure()
with:
name: Test Results - Ubuntu
path: 'test-results/*.trx'
reporter: dotnet-trx
- name: .NET Lib Pack
run: dotnet pack src/StackExchange.Redis/StackExchange.Redis.csproj --no-build -c Release /p:Packing=true /p:PackageOutputPath=%CD%\.nupkgs /p:CI=true
windows:
name: StackExchange.Redis (Windows Server 2022)
runs-on: windows-2022
env:
NUGET_CERT_REVOCATION_MODE: offline # Disabling signing because of massive perf hit, see https://github.com/NuGet/Home/issues/11548
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: "1" # Note this doesn't work yet for Windows - see https://github.com/dotnet/runtime/issues/68340
TERM: xterm
DOCKER_BUILDKIT: 1
steps:
- name: Checkout code
uses: actions/checkout@v1
# - name: Install .NET SDK
# uses: actions/setup-dotnet@v3
# with:
# dotnet-version: |
# 6.0.x
# 8.0.x
- name: .NET Build
run: dotnet build Build.csproj -c Release /p:CI=true
# We can't do this combination - see https://github.com/actions/runner/issues/904
# - name: Start Redis Services (docker-compose)
# working-directory: .\tests\RedisConfigs
# run: docker compose -f docker-compose.yml up -d --wait
- name: Start Redis Services (v3.0.503)
working-directory: .\tests\RedisConfigs\3.0.503
run: |
.\redis-server.exe --service-install --service-name "redis-6379" "..\Basic\primary-6379-3.0.conf"
.\redis-server.exe --service-install --service-name "redis-6380" "..\Basic\replica-6380.conf"
.\redis-server.exe --service-install --service-name "redis-6381" "..\Basic\secure-6381.conf"
.\redis-server.exe --service-install --service-name "redis-6382" "..\Failover\primary-6382.conf"
.\redis-server.exe --service-install --service-name "redis-6383" "..\Failover\replica-6383.conf"
.\redis-server.exe --service-install --service-name "redis-7000" "..\Cluster\cluster-7000.conf" --dir "..\Cluster"
.\redis-server.exe --service-install --service-name "redis-7001" "..\Cluster\cluster-7001.conf" --dir "..\Cluster"
.\redis-server.exe --service-install --service-name "redis-7002" "..\Cluster\cluster-7002.conf" --dir "..\Cluster"
.\redis-server.exe --service-install --service-name "redis-7003" "..\Cluster\cluster-7003.conf" --dir "..\Cluster"
.\redis-server.exe --service-install --service-name "redis-7004" "..\Cluster\cluster-7004.conf" --dir "..\Cluster"
.\redis-server.exe --service-install --service-name "redis-7005" "..\Cluster\cluster-7005.conf" --dir "..\Cluster"
.\redis-server.exe --service-install --service-name "redis-7010" "..\Sentinel\redis-7010.conf"
.\redis-server.exe --service-install --service-name "redis-7011" "..\Sentinel\redis-7011.conf"
.\redis-server.exe --service-install --service-name "redis-26379" "..\Sentinel\sentinel-26379.conf" --sentinel
.\redis-server.exe --service-install --service-name "redis-26380" "..\Sentinel\sentinel-26380.conf" --sentinel
.\redis-server.exe --service-install --service-name "redis-26381" "..\Sentinel\sentinel-26381.conf" --sentinel
Start-Service redis-*
- name: StackExchange.Redis.Tests
run: dotnet test tests/StackExchange.Redis.Tests/StackExchange.Redis.Tests.csproj -c Release --logger trx --logger GitHubActions --results-directory ./test-results/ /p:CI=true
- uses: dorny/test-reporter@v1
continue-on-error: true
if: success() || failure()
with:
name: Tests Results - Windows Server 2022
path: 'test-results/*.trx'
reporter: dotnet-trx