Skip to content

Commit

Permalink
splits
Browse files Browse the repository at this point in the history
  • Loading branch information
chayim committed May 15, 2023
1 parent e480322 commit 01fdb58
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 4 deletions.
49 changes: 47 additions & 2 deletions .github/workflows/version_coverage.yml
Expand Up @@ -19,7 +19,7 @@ permissions:

jobs:

run-tests:
run-tests-pre-7:
services:
redis:
image: redis:${{matrix.redis-version}}
Expand All @@ -31,7 +31,7 @@ jobs:
max-parallel: 15
fail-fast: false
matrix:
redis-version: ['5.0', '6.0', '6.2', '7.0']
redis-version: ['5.0', '6.0', '6.2']
python-version: ['3.7', '3.11']
redis-url: ["redis://localhost:6379"]
resp: ["2"]
Expand All @@ -56,6 +56,51 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: run tests
run: |
pip install -U setuptools wheel
pip install -r dev_requirements.txt
pip install -r requirements.txt
pytest -m "not onlycluster and not redismod and not ssl and not replica" --redis-url=${{matrix.redis-url}}
run-tests-7-plus:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
max-parallel: 15
fail-fast: false
matrix:
redis-version: ['7.0']
python-version: ['3.7', '3.11']
redis-url: ["redis://localhost:6379"]
resp: ["2"]
include:
- redis-version: 7.0
redis-url: "redis://localhost:6379?protocol=3"
resp: "3"
python-version: '3.7'
- redis-version: 7.0
redis-url: "redis://localhost:6379?protocol=3"
resp: "3"
python-version: '3.11'
- redis-version: 7.0
python-version: '3.7'
- redis-version: 7.0
python-version: '3.11'


env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
name: redis ${{matrix.redis-version}} [resp ${{matrix.resp}}] [py ${{matrix.python-version}}]

steps:
- run: |
docker run -p 6379:6379 -d redis:${{matrix.redis-version}} --enable-module-command yes --enable-debug-command yes
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_command_parser.py
Expand Up @@ -21,7 +21,7 @@ def test_get_keys_predetermined_key_location(self, r):
assert commands_parser.get_keys(r, *args3) == ["foo", "bar", "foobar"]

@pytest.mark.filterwarnings("ignore:ResponseError")
@pytest.mark.skip_if_server_version_lt("6.0.0")
@skip_if_server_version_lt("6.0.0")
@skip_if_redis_enterprise()
def test_get_moveable_keys(self, r):
commands_parser = CommandsParser(r)
Expand Down
5 changes: 4 additions & 1 deletion tests/test_commands.py
Expand Up @@ -4039,7 +4039,10 @@ def test_xautoclaim(self, r):
# trying to claim a message that isn't already pending doesn't
# do anything
response = r.xautoclaim(stream, group, consumer2, min_idle_time=0)
assert response == [b"0-0", []]
try:
assert response == [b"0-0", []]
except AssertionError:
assert response == [b"0-0", [], []]

# read the group as consumer1 to initially claim the messages
r.xreadgroup(group, consumer1, streams={stream: ">"})
Expand Down

0 comments on commit 01fdb58

Please sign in to comment.