[Tests] Only run SSL tests in Docker (#1918)

* Only run SSL tests in docker workflow

* Rename workflow
main
Cyril Chapellier 2 years ago committed by GitHub
parent 0b5a90adac
commit 421fd98a9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10,8 +10,8 @@ permissions:
contents: read # to fetch code (actions/checkout)
jobs:
test-with-ssl:
name: Test all, including SSL tests
ssl-test:
name: Run SSL tests
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
@ -21,11 +21,11 @@ jobs:
file: tests/Dockerfile
tags: rqtest-image:latest
push: false
- name: Launch tox for all test scenarii
- name: Launch tox SSL env only (will only run SSL specific tests)
uses: addnab/docker-run-action@v3
with:
image: rqtest-image:latest
run: stunnel & redis-server & RUN_SSL_TESTS=1 tox
run: stunnel & redis-server & RUN_SSL_TESTS=1 tox run -e ssl
test:
name: Python${{ matrix.python-version }}/Redis${{ matrix.redis-version }}/redis-py${{ matrix.redis-py-version }}

@ -2,6 +2,7 @@ import logging
import os
import unittest
import pytest
from redis import Redis
from rq import pop_connection, push_connection
@ -25,10 +26,12 @@ def find_empty_redis_database(ssl=False):
def slow(f):
f = pytest.mark.slow(f)
return unittest.skipUnless(os.environ.get('RUN_SLOW_TESTS_TOO'), "Slow tests disabled")(f)
def ssl_test(f):
f = pytest.mark.ssl_test(f)
return unittest.skipUnless(os.environ.get('RUN_SSL_TESTS'), "SSL tests disabled")(f)

@ -45,3 +45,14 @@ deps = {[testenv]deps}
skipdist = True
basepython = python3.10
deps = {[testenv]deps}
[testenv:ssl]
skipdist = True
basepython = python3.10
deps=
pytest
sentry-sdk
psutil
passenv=
RUN_SSL_TESTS
commands=pytest -m ssl_test {posargs}

Loading…
Cancel
Save