Skip to content

Commit 244ebbf

Browse files
chayimshacharPash
andauthored
Updating CI to latest redis versions (#163)
* Redis version bump for testing * change RC to Uppercase * skip graph tests if version is 7.2.0-RC3 * delete new traits * else if => elif * elif => if * elif * Try somthing * try * try to fix contitions * lessSkipAttr * WIP * Try to use SkipIfRedisVersionLt Attribute * go back * fixes of places with graph * change to SkipIfRedisVersionGte("7.2.0-RC3") * try diif version * try very small version to check if skip * change version to 7.1.242 * Delete trait * one SkipIfRedisVersionAttribute * fix error --------- Co-authored-by: shacharPash <[email protected]> Co-authored-by: shacharPash <[email protected]>
1 parent af0d5fa commit 244ebbf

File tree

7 files changed

+247
-117
lines changed

7 files changed

+247
-117
lines changed

.github/workflows/integration.yml

+4-12
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
redis-stack-version: ["6.2.6-v7", "7.0.6-RC8", "edge"]
21+
redis-stack-version: ["6.2.6-v9", "7.2.0-RC3", "edge"]
2222
env:
2323
USER_NAME: ${{ secrets.USER_NAME }}
2424
PASSWORD: ${{ secrets.PASSWORD }}
@@ -46,22 +46,14 @@ jobs:
4646
echo "${{secrets.REDIS_USER_CRT}}" > tests/NRedisStack.Tests/bin/Debug/net6.0/redis_user.crt
4747
echo "${{secrets.REDIS_USER_PRIVATE_KEY}}" > tests/NRedisStack.Tests/bin/Debug/net6.0/redis_user_private.key
4848
ls -R
49-
if [ "$REDIS_VERSION" != "edge" ]; then
50-
dotnet test -f net6.0 --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover --filter Category!=edge
51-
else
52-
dotnet test -f net6.0 --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
53-
fi
49+
dotnet test -f net6.0 --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
5450
- name: Test
5551
run: |
5652
echo "${{secrets.REDIS_CA_PEM}}" > tests/NRedisStack.Tests/bin/Debug/net7.0/redis_ca.pem
5753
echo "${{secrets.REDIS_USER_CRT}}" > tests/NRedisStack.Tests/bin/Debug/net7.0/redis_user.crt
5854
echo "${{secrets.REDIS_USER_PRIVATE_KEY}}" > tests/NRedisStack.Tests/bin/Debug/net7.0/redis_user_private.key
5955
ls -R
60-
if [ "$REDIS_VERSION" != "edge" ]; then
61-
dotnet test -f net7.0 --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover --filter Category!=edge
62-
else
63-
dotnet test -f net7.0 --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
64-
fi
56+
dotnet test -f net7.0 --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
6557
- name: Codecov
6658
uses: codecov/codecov-action@v3
6759
with:
@@ -105,4 +97,4 @@ jobs:
10597
shell: cmd
10698
run: |
10799
START wsl ./redis-stack-server-${{env.redis_stack_version}}/bin/redis-stack-server &
108-
dotnet test -f net481 --no-build --verbosity normal --filter Category!=edge
100+
dotnet test -f net481 --no-build --verbosity normal

tests/NRedisStack.Tests/Gears/GearsTests.cs

+7-14
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ public void Dispose()
1616
}
1717

1818

19-
[Fact]
20-
[Trait("Category", "edge")]
19+
[SkipIfRedisVersion(Comparison.LessThan, "7.1.242")]
2120
public void TestTFunctionLoadDelete()
2221
{
2322
IDatabase db = redisFixture.Redis.GetDatabase();
@@ -27,8 +26,7 @@ public void TestTFunctionLoadDelete()
2726
}
2827

2928

30-
[Fact]
31-
[Trait("Category", "edge")]
29+
[SkipIfRedisVersion(Comparison.LessThan, "7.1.242")]
3230
public async Task TestTFunctionLoadDeleteAsync()
3331
{
3432
IDatabase db = redisFixture.Redis.GetDatabase();
@@ -39,8 +37,7 @@ public async Task TestTFunctionLoadDeleteAsync()
3937
Assert.True(await db.TFunctionDeleteAsync("lib"));
4038
}
4139

42-
[Fact]
43-
[Trait("Category", "edge")]
40+
[SkipIfRedisVersion(Comparison.LessThan, "7.1.242")]
4441
public void TestTFunctionList()
4542
{
4643
IDatabase db = redisFixture.Redis.GetDatabase();
@@ -71,8 +68,7 @@ public void TestTFunctionList()
7168
Assert.True(db.TFunctionDelete("lib3"));
7269
}
7370

74-
[Fact]
75-
[Trait("Category", "edge")]
71+
[SkipIfRedisVersion(Comparison.LessThan, "7.1.242")]
7672
public async Task TestTFunctionListAsync()
7773
{
7874
IDatabase db = redisFixture.Redis.GetDatabase();
@@ -101,8 +97,7 @@ public async Task TestTFunctionListAsync()
10197
Assert.True(await db.TFunctionDeleteAsync("lib3"));
10298
}
10399

104-
[Fact]
105-
[Trait("Category", "edge")]
100+
[SkipIfRedisVersion(Comparison.LessThan, "7.1.242")]
106101
public void TestTFCall()
107102
{
108103
IDatabase db = redisFixture.Redis.GetDatabase();
@@ -116,8 +111,7 @@ public void TestTFCall()
116111
Assert.True(db.TFunctionDelete("lib"));
117112
}
118113

119-
[Fact]
120-
[Trait("Category", "edge")]
114+
[SkipIfRedisVersion(Comparison.LessThan, "7.1.242")]
121115
public async Task TestTFCallAsync()
122116
{
123117
IDatabase db = redisFixture.Redis.GetDatabase();
@@ -131,8 +125,7 @@ public async Task TestTFCallAsync()
131125
Assert.True(await db.TFunctionDeleteAsync("lib"));
132126
}
133127

134-
[Fact]
135-
[Trait("Category", "edge")]
128+
[SkipIfRedisVersion(Comparison.LessThan, "7.1.242")]
136129
public void TestGearsCommandBuilder()
137130
{
138131
// TFunctionLoad:

0 commit comments

Comments
 (0)