diff options
author | Ruslan Mullakhmetov <theambient@me.com> | 2020-10-22 02:24:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-22 07:24:16 +0700 |
commit | 0e65bab10b1dc9040c98b7d2bf108f3279c84de5 (patch) | |
tree | 4fce86c06aea1e445726d98bc80c9a6944429e14 | |
parent | f5ce159b60e426b229a0605c3b9c952e50e98aea (diff) | |
download | rq-0e65bab10b1dc9040c98b7d2bf108f3279c84de5.tar.gz |
tests: added ability to run tests in Docker (#1361)
* tests: added ability to run tests in Docker
useful to run full test suit on Mac
* tests: minor improvement in dockerfile for tests
* tests: typo in Dockerfile
* tests: updated dev requirements
Co-authored-by: Ruslan Mullakhmetov <ruslan@twentythree.net>
-rw-r--r-- | Dockerfile | 11 | ||||
-rw-r--r-- | dev-requirements.txt | 3 | ||||
-rwxr-xr-x | run_tests_in_docker.sh | 3 |
3 files changed, 16 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ba9f1ff --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM ubuntu:latest + +RUN apt-get update +RUN apt-get install -y redis-server python3-pip + +COPY . /tmp/rq +WORKDIR /tmp/rq +RUN pip3 install -r /tmp/rq/requirements.txt -r /tmp/rq/dev-requirements.txt +RUN python3 /tmp/rq/setup.py build && python3 /tmp/rq/setup.py install + +CMD redis-server& RUN_SLOW_TESTS_TOO=1 pytest /tmp/rq/tests/ --durations=5 -v --log-cli-level 10 diff --git a/dev-requirements.txt b/dev-requirements.txt index ccb6eff..d33f677 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,3 +1,4 @@ mock -pytest psutil +pytest +sentry_sdk diff --git a/run_tests_in_docker.sh b/run_tests_in_docker.sh new file mode 100755 index 0000000..2388b03 --- /dev/null +++ b/run_tests_in_docker.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker build . -t rqtest && docker run --rm rqtest |