-
Notifications
You must be signed in to change notification settings - Fork 39
100 lines (97 loc) · 3.85 KB
/
integration.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
97
98
99
100
name: Integration Tests
on:
push:
paths-ignore:
- 'docs/**'
- '**/*.md'
branches:
- master
pull_request:
schedule:
- cron: "0 1 * * *"
jobs:
build_and_Test:
name: Test [redis-stack ${{matrix.redis-stack-version}}]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
redis-stack-version: ["6.2.6-v9", "7.2.0-RC3", "edge"]
env:
USER_NAME: ${{ secrets.USER_NAME }}
PASSWORD: ${{ secrets.PASSWORD }}
ENDPOINT: ${{ secrets.ENDPOINT }}
REDIS_VERSION: ${{ matrix.redis-stack-version }}
steps:
- uses: actions/checkout@v3
- name: .NET Core 6
uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.x'
- name: .NET Core 7
uses: actions/setup-dotnet@v2
with:
dotnet-version: '7.0.x'
- name: run redis-stack-server docker
run: docker run -p 6379:6379 -d redis/redis-stack-server:${{matrix.redis-stack-version}}
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore /p:ContinuousIntegrationBuild=true
- name: Test
run: |
echo "${{secrets.REDIS_CA_PEM}}" > tests/NRedisStack.Tests/bin/Debug/net6.0/redis_ca.pem
echo "${{secrets.REDIS_USER_CRT}}" > tests/NRedisStack.Tests/bin/Debug/net6.0/redis_user.crt
echo "${{secrets.REDIS_USER_PRIVATE_KEY}}" > tests/NRedisStack.Tests/bin/Debug/net6.0/redis_user_private.key
ls -R
dotnet test -f net6.0 --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
- name: Test
run: |
echo "${{secrets.REDIS_CA_PEM}}" > tests/NRedisStack.Tests/bin/Debug/net7.0/redis_ca.pem
echo "${{secrets.REDIS_USER_CRT}}" > tests/NRedisStack.Tests/bin/Debug/net7.0/redis_user.crt
echo "${{secrets.REDIS_USER_PRIVATE_KEY}}" > tests/NRedisStack.Tests/bin/Debug/net7.0/redis_user_private.key
ls -R
dotnet test -f net7.0 --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
- name: Codecov
uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}
verbose: true
- name: Build
run: dotnet pack -c Release
build_and_test_windows:
name: Windows Test ${{matrix.redis-stack-version}}
runs-on: windows-latest
env:
redis_stack_version: 6.2.6-v7
USER_NAME: ${{ secrets.USER_NAME }}
PASSWORD: ${{ secrets.PASSWORD }}
ENDPOINT: ${{ secrets.ENDPOINT }}
steps:
- uses: actions/checkout@v3
- uses: Vampire/setup-wsl@v2
with:
distribution: Ubuntu-22.04
- name: Install Redis
shell: wsl-bash {0}
run: |
sudo apt-get update
sudo apt-get install curl -y && sudo apt-get install gpg -y && apt-get install lsb-release -y && apt-get install libgomp1 -y
curl https://packages.redis.io/redis-stack/redis-stack-server-${{env.redis_stack_version}}.jammy.x86_64.tar.gz -o redis-stack.tar.gz
tar xf redis-stack.tar.gz
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore /p:ContinuousIntegrationBuild=true
- name: Save test certificates
shell: wsl-bash {0}
run: |
echo "${{secrets.REDIS_CA_PEM}}" > tests/NRedisStack.Tests/bin/Debug/net481/redis_ca.pem
echo "${{secrets.REDIS_USER_CRT}}" > tests/NRedisStack.Tests/bin/Debug/net481/redis_user.crt
echo "${{secrets.REDIS_USER_PRIVATE_KEY}}" > tests/NRedisStack.Tests/bin/Debug/net481/redis_user_private.key
ls -R
- name: Test
shell: cmd
run: |
START wsl ./redis-stack-server-${{env.redis_stack_version}}/bin/redis-stack-server &
dotnet test -f net481 --no-build --verbosity normal