-
Notifications
You must be signed in to change notification settings - Fork 469
Provide a preconfigured docker command to run tests #655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,7 +46,7 @@ launch them through: | |
| [docker-compose]: https://www.docker.com/products/docker-compose | ||
|
|
||
|
|
||
| #### Running the Tests | ||
| #### Running the Tests in your local environment | ||
|
|
||
| Once docker is up and running you should be able to run the tests. To launch a | ||
| single test manually. For example to run the tests for `redis-py` 2.10 on Python | ||
|
|
@@ -61,6 +61,33 @@ To launch the complete test matrix run: | |
| $ tox | ||
|
|
||
|
|
||
| #### Running Tests in docker | ||
|
|
||
| If you prefer not to setup your local machine to run tests, we provide a preconfigured docker image. | ||
| Note that this image is the same used in CircleCI to run tests. | ||
|
|
||
| You still need docker containers running additional services up and running. | ||
|
|
||
| Run the test runner | ||
|
|
||
| $ docker-compose run --rm testrunner | ||
|
|
||
| Now you are in a bash shell. You can now run tests as you would do in your local environment: | ||
|
|
||
| $ tox -e '{py35,py36}-redis{210}' | ||
|
|
||
| If you are in a unix machine, we also provide a shell script to execute commands in the provided container (so you don't | ||
| forget to remove-`--rm` the container after you run it). | ||
|
|
||
| For example to run the tests for `redis-py` 2.10 on Python 3.5 and 3.6: | ||
|
|
||
| $ ./scripts/ddtest tox -e '{py35,py36}-redis{210}' | ||
|
|
||
| You can also add the `scripts` folder to your path, so then you can run | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This last part we can remove. I think if we want to keep this suggestion we need to add instructions on how to add it to your path, and then we need to update the script to be runnable from any location on your system. e.g. if I added to my path and did: cd ~/Desktop
ddtest bashI'd get a I've done it before where it can be runnable from anywhere so can provide guidance there if that is the direction we want to head in. |
||
|
|
||
| $ ddtest tox -e '{py35,py36}-redis{210}' | ||
|
|
||
|
|
||
| ### Continuous Integration | ||
|
|
||
| We use CircleCI 2.0 for our continuous integration. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -e | ||
|
|
||
| docker-compose run --rm testrunner $* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a shell script, so I guess it is not running on Windows? (not a Windows user). I will replace with
MAC or Linux machine: ack?