Updating CI to latest redis versions #1140
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |