diff --git a/.github/workflows/doctests.yml b/.github/workflows/doctests.yml
deleted file mode 100644
index b170bedf..00000000
--- a/.github/workflows/doctests.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-name: Documentation Tests
-
-on:
- push:
- pull_request:
-
- workflow_dispatch:
-
-permissions:
- contents: read
-
-concurrency:
- group: ${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-jobs:
- doctests:
- runs-on: ubuntu-latest
- services:
- redis-stack:
- image: redis/redis-stack-server:latest
- options: >-
- --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
- ports:
- - 6379:6379
- 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 tests
- working-directory: tests/Doc
- run: |
- dotnet test
diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml
index ac6128a0..d0a4eaf2 100644
--- a/.github/workflows/integration.yml
+++ b/.github/workflows/integration.yml
@@ -12,7 +12,7 @@ on:
- cron: "0 1 * * *"
concurrency:
- group: ${{ github.event.pull_request.number || github.ref }}
+ group: ${{ github.event.pull_request.number || github.ref }}-integration
cancel-in-progress: true
jobs:
@@ -22,6 +22,7 @@ jobs:
with:
redis_stack_type: cluster
clr_version: net6.0
+ dotnet_sdk_version: 6.0.0
dotenv_file: .github/cluster.env
secrets: inherit
@@ -36,6 +37,7 @@ jobs:
with:
redis_stack_type: ${{matrix.redis-stack-type}}
clr_version: net6.0
+ dotnet_sdk_version: 6.0.0
dotenv_file: .github/standalone.env
secrets: inherit
@@ -45,6 +47,7 @@ jobs:
with:
redis_stack_type: cluster
clr_version: net7.0
+ dotnet_sdk_version: 7.0.0
dotenv_file: .github/cluster.env
secrets: inherit
@@ -59,6 +62,7 @@ jobs:
with:
redis_stack_type: ${{matrix.redis-stack-type}}
clr_version: net7.0
+ dotnet_sdk_version: 7.0.0
dotenv_file: .github/standalone.env
secrets: inherit
@@ -68,6 +72,7 @@ jobs:
with:
redis_stack_type: cluster
clr_version: net8.0
+ dotnet_sdk_version: 8.0.0
dotenv_file: .github/cluster.env
secrets: inherit
@@ -82,6 +87,7 @@ jobs:
with:
redis_stack_type: ${{matrix.redis-stack-type}}
clr_version: net8.0
+ dotnet_sdk_version: 8.0.0
dotenv_file: .github/standalone.env
secrets: inherit
diff --git a/.github/workflows/linter.yaml b/.github/workflows/linter.yaml
index 3ef14d77..7c776851 100644
--- a/.github/workflows/linter.yaml
+++ b/.github/workflows/linter.yaml
@@ -3,7 +3,7 @@ name: Format check on pull request
on: pull_request
concurrency:
- group: ${{ github.event.pull_request.number || github.ref }}
+ group: ${{ github.event.pull_request.number || github.ref }}-linter
cancel-in-progress: true
jobs:
@@ -14,9 +14,7 @@ jobs:
run: dotnet tool install -g dotnet-format
- name: Checkout repo
- uses: actions/checkout@v2
- with:
- ref: ${{ github.head_ref }}
+ uses: actions/checkout@v3
- name: lint
run: |
diff --git a/.github/workflows/nuget-release.yml b/.github/workflows/nuget-release.yml
index ff128062..5a9b5d23 100644
--- a/.github/workflows/nuget-release.yml
+++ b/.github/workflows/nuget-release.yml
@@ -9,17 +9,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- - name: Set up .NET Core 6
- uses: actions/setup-dotnet@v2
+ - name: Set up .NET Core 8
+ uses: actions/setup-dotnet@v3
with:
- dotnet-version: '6.0.x'
- - name: Set up .NET Core 7
- uses: actions/setup-dotnet@v2
- with:
- dotnet-version: '7.0.x'
+ dotnet-version: 8
+ - name: Check .NET version
+ run: dotnet --version
+ - name: Check .NET SDKs
+ run: dotnet --list-sdks
+ - name: Check .NET runtimes
+ run: dotnet --list-runtimes
- name: Build
run: dotnet pack -c Release --output .
-
- name: Publish
uses: alirezanet/publish-nuget@v3.0.3
with:
diff --git a/.github/workflows/reusable.yml b/.github/workflows/reusable.yml
index 8d0b19cf..cf994820 100644
--- a/.github/workflows/reusable.yml
+++ b/.github/workflows/reusable.yml
@@ -7,15 +7,22 @@ on:
required: true
type: string
+ # Target .NET framework, i.e. "net6.0".
clr_version:
required: true
type: string
+ # SDK version, as obtained when running `dotnet --list-sdks`,
+ # i.e. "6.0.418", although it is safe to use '6.0.0' because
+ # in global.json we set the rollForward strategy to "latestMinor".
+ dotnet_sdk_version:
+ required: true
+ type: string
+
dotenv_file:
required: true
type: string
jobs:
-
build_and_test:
name: Test
runs-on: ubuntu-latest
@@ -25,24 +32,12 @@ jobs:
PASSWORD: ${{ secrets.PASSWORD }}
ENDPOINT: ${{ secrets.ENDPOINT }}
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: .NET Core 8 preview
+ - name: .NET Core 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8
- dotnet-quality: 'preview'
- name: run redis-stack-server docker
working-directory: .github
@@ -53,16 +48,27 @@ jobs:
with:
env-file: ${{inputs.dotenv_file}}
+ # Make sure only the desired dotnet version is set both as target and as active SDK.
+ - name: Tweak target frameworks
+ run: |
+ find . -name '*.csproj' | xargs -I {} sed -E -i 's|.*|${{inputs.clr_version}}|' {}
+ find . -name '*.csproj' | xargs cat
+ jq -n --arg version ${{inputs.dotnet_sdk_version}} '{"sdk":{"version":$version,"rollForward":"latestMinor"}}' > global.json
+ - name: Check .NET version
+ run: dotnet --version
+ - name: Check .NET SDKs
+ run: dotnet --list-sdks
+ - name: Check .NET runtimes
+ run: dotnet --list-runtimes
- 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
+ echo "${{secrets.REDIS_CA_PEM}}" > tests/NRedisStack.Tests/bin/Debug/${{inputs.clr_version}}/redis_ca.pem
+ echo "${{secrets.REDIS_USER_CRT}}" > tests/NRedisStack.Tests/bin/Debug/${{inputs.clr_version}}/redis_user.crt
+ echo "${{secrets.REDIS_USER_PRIVATE_KEY}}" > tests/NRedisStack.Tests/bin/Debug/${{inputs.clr_version}}/redis_user_private.key
dotnet test -f ${{inputs.clr_version}} --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
- name: Codecov
uses: codecov/codecov-action@v3
@@ -71,4 +77,3 @@ jobs:
verbose: true
- name: Build
run: dotnet pack -c Release
-
diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml
index a1413e96..228297d5 100644
--- a/.github/workflows/spellcheck.yml
+++ b/.github/workflows/spellcheck.yml
@@ -4,7 +4,7 @@ on:
pull_request:
concurrency:
- group: ${{ github.event.pull_request.number || github.ref }}
+ group: ${{ github.event.pull_request.number || github.ref }}-spellcheck
cancel-in-progress: true
jobs:
diff --git a/.gitignore b/.gitignore
index 3cf3c6c1..fd1be9e5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -405,3 +405,6 @@ tests/NRedisStack.Tests/redis_ca.pem
tests/NRedisStack.Tests/redis_credentials/redis_user_private.key
tests/NRedisStack.Tests/redis_credentials/redis_user.crt
.env
+
+# global.json
+global.json
diff --git a/src/NRedisStack/NRedisStack.csproj b/src/NRedisStack/NRedisStack.csproj
index 58467115..df5fbeb8 100644
--- a/src/NRedisStack/NRedisStack.csproj
+++ b/src/NRedisStack/NRedisStack.csproj
@@ -2,7 +2,7 @@
enable
- netstandard2.0;net6.0;net7.0
+ netstandard2.0;net6.0;net7.0;net8.0
latest
enable
Redis Open Source
diff --git a/src/NRedisStack/TimeSeries/TimeSeriesAux.cs b/src/NRedisStack/TimeSeries/TimeSeriesAux.cs
index 65ad7c94..54c20f65 100644
--- a/src/NRedisStack/TimeSeries/TimeSeriesAux.cs
+++ b/src/NRedisStack/TimeSeries/TimeSeriesAux.cs
@@ -81,7 +81,7 @@ public static void AddOnDuplicate(this IList