mirror of https://github.com/rq/rq.git
[Tests] Only run SSL tests in Docker (#1918)
* Only run SSL tests in docker workflow * Rename workflow
This commit is contained in:
parent
0b5a90adac
commit
421fd98a9c
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue