Skip to content

Commit

Permalink
Updating CI to latest redis versions (#163)
Browse files Browse the repository at this point in the history
* 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 <93581407+shacharPash@users.noreply.github.com>
Co-authored-by: shacharPash <shachar.pashchur@redis.com>
  • Loading branch information
3 people authored Aug 14, 2023
1 parent af0d5fa commit 244ebbf
Show file tree
Hide file tree
Showing 7 changed files with 247 additions and 117 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
redis-stack-version: ["6.2.6-v7", "7.0.6-RC8", "edge"]
redis-stack-version: ["6.2.6-v9", "7.2.0-RC3", "edge"]
env:
USER_NAME: ${{ secrets.USER_NAME }}
PASSWORD: ${{ secrets.PASSWORD }}
Expand Down Expand Up @@ -46,22 +46,14 @@ jobs:
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
if [ "$REDIS_VERSION" != "edge" ]; then
dotnet test -f net6.0 --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover --filter Category!=edge
else
dotnet test -f net6.0 --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
fi
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
if [ "$REDIS_VERSION" != "edge" ]; then
dotnet test -f net7.0 --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover --filter Category!=edge
else
dotnet test -f net7.0 --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
fi
dotnet test -f net7.0 --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
- name: Codecov
uses: codecov/codecov-action@v3
with:
Expand Down Expand Up @@ -105,4 +97,4 @@ jobs:
shell: cmd
run: |
START wsl ./redis-stack-server-${{env.redis_stack_version}}/bin/redis-stack-server &
dotnet test -f net481 --no-build --verbosity normal --filter Category!=edge
dotnet test -f net481 --no-build --verbosity normal
21 changes: 7 additions & 14 deletions tests/NRedisStack.Tests/Gears/GearsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ public void Dispose()
}


[Fact]
[Trait("Category", "edge")]
[SkipIfRedisVersion(Comparison.LessThan, "7.1.242")]
public void TestTFunctionLoadDelete()
{
IDatabase db = redisFixture.Redis.GetDatabase();
Expand All @@ -27,8 +26,7 @@ public void TestTFunctionLoadDelete()
}


[Fact]
[Trait("Category", "edge")]
[SkipIfRedisVersion(Comparison.LessThan, "7.1.242")]
public async Task TestTFunctionLoadDeleteAsync()
{
IDatabase db = redisFixture.Redis.GetDatabase();
Expand All @@ -39,8 +37,7 @@ public async Task TestTFunctionLoadDeleteAsync()
Assert.True(await db.TFunctionDeleteAsync("lib"));
}

[Fact]
[Trait("Category", "edge")]
[SkipIfRedisVersion(Comparison.LessThan, "7.1.242")]
public void TestTFunctionList()
{
IDatabase db = redisFixture.Redis.GetDatabase();
Expand Down Expand Up @@ -71,8 +68,7 @@ public void TestTFunctionList()
Assert.True(db.TFunctionDelete("lib3"));
}

[Fact]
[Trait("Category", "edge")]
[SkipIfRedisVersion(Comparison.LessThan, "7.1.242")]
public async Task TestTFunctionListAsync()
{
IDatabase db = redisFixture.Redis.GetDatabase();
Expand Down Expand Up @@ -101,8 +97,7 @@ public async Task TestTFunctionListAsync()
Assert.True(await db.TFunctionDeleteAsync("lib3"));
}

[Fact]
[Trait("Category", "edge")]
[SkipIfRedisVersion(Comparison.LessThan, "7.1.242")]
public void TestTFCall()
{
IDatabase db = redisFixture.Redis.GetDatabase();
Expand All @@ -116,8 +111,7 @@ public void TestTFCall()
Assert.True(db.TFunctionDelete("lib"));
}

[Fact]
[Trait("Category", "edge")]
[SkipIfRedisVersion(Comparison.LessThan, "7.1.242")]
public async Task TestTFCallAsync()
{
IDatabase db = redisFixture.Redis.GetDatabase();
Expand All @@ -131,8 +125,7 @@ public async Task TestTFCallAsync()
Assert.True(await db.TFunctionDeleteAsync("lib"));
}

[Fact]
[Trait("Category", "edge")]
[SkipIfRedisVersion(Comparison.LessThan, "7.1.242")]
public void TestGearsCommandBuilder()
{
// TFunctionLoad:
Expand Down
Loading

0 comments on commit 244ebbf

Please sign in to comment.