Skip to content

Commit 6a4c544

Browse files
committed
Run stack tests against 8.0
1 parent b2dd8e8 commit 6a4c544

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

.github/actions/run-tests/action.yml

+13-6
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,19 @@ runs:
109109
fi
110110

111111
echo "::endgroup::"
112-
113-
if [ "$protocol" == "2" ] || [ "${{inputs.parser-backend}}" != 'hiredis' ]; then
114-
echo "::group::RESP${protocol} cluster tests"
115-
invoke cluster-tests $eventloop --protocol=${protocol}
116-
echo "::endgroup::"
117-
fi
112+
113+
if (( $REDIS_MAJOR_VERSION < 8 )); then
114+
if [ "$protocol" == "2" ] || [ "${{inputs.parser-backend}}" != 'hiredis' ]; then
115+
echo "::group::RESP${protocol} cluster tests"
116+
invoke cluster-tests $eventloop --protocol=${protocol} --extra-markers="not redismod"
117+
echo "::endgroup::"
118+
fi
119+
else
120+
if [ "$protocol" == "2" ] || [ "${{inputs.parser-backend}}" != 'hiredis' ]; then
121+
echo "::group::RESP${protocol} cluster tests"
122+
invoke cluster-tests $eventloop --protocol=${protocol}
123+
echo "::endgroup::"
124+
fi
118125
}
119126

120127
run_tests 2 "${{inputs.event-loop}}"

tasks.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,19 @@ def standalone_tests(
6969

7070

7171
@task
72-
def cluster_tests(c, uvloop=False, protocol=2, profile=False):
72+
def cluster_tests(c, uvloop=False, protocol=2, profile=False, extra_markers=""):
7373
"""Run tests against a redis cluster"""
7474
profile_arg = "--profile" if profile else ""
7575
cluster_url = "redis://localhost:16379/0"
7676
cluster_tls_url = "rediss://localhost:27379/0"
77+
extra_markers = f" and {extra_markers}" if extra_markers else ""
7778
if uvloop:
7879
run(
79-
f"pytest {profile_arg} --protocol={protocol} --cov=./ --cov-report=xml:coverage_cluster_resp{protocol}_uvloop.xml -m 'not onlynoncluster and not redismod and not graph' --redis-url={cluster_url} --redis-ssl-url={cluster_tls_url} --junit-xml=cluster-resp{protocol}-uvloop-results.xml --uvloop"
80+
f"pytest {profile_arg} --protocol={protocol} --cov=./ --cov-report=xml:coverage_cluster_resp{protocol}_uvloop.xml -m 'not onlynoncluster and not graph{extra_markers}' --redis-url={cluster_url} --redis-ssl-url={cluster_tls_url} --junit-xml=cluster-resp{protocol}-uvloop-results.xml --uvloop"
8081
)
8182
else:
8283
run(
83-
f"pytest {profile_arg} --protocol={protocol} --cov=./ --cov-report=xml:coverage_cluster_resp{protocol}.xml -m 'not onlynoncluster and not redismod and not graph' --redis-url={cluster_url} --redis-ssl-url={cluster_tls_url} --junit-xml=cluster-resp{protocol}-results.xml"
84+
f"pytest {profile_arg} --protocol={protocol} --cov=./ --cov-report=xml:coverage_cluster_resp{protocol}.xml -m 'not onlynoncluster and not graph{extra_markers}' --redis-url={cluster_url} --redis-ssl-url={cluster_tls_url} --junit-xml=cluster-resp{protocol}-results.xml"
8485
)
8586

8687

0 commit comments

Comments
 (0)