Skip to content

Commit 00a31cc

Browse files
committed
Update CONTRIBUTING.md
add information about new test setup
1 parent 055ca37 commit 00a31cc

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ runs:
3838
echo "Version not found in the mapping."
3939
exit 1
4040
fi
41+
sleep 10 # wait for redis to start
4142
shell: bash
4243
- name: Set up Docker Compose environment with redis ${{ inputs.redis-version }}
4344
run: |

CONTRIBUTING.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,33 @@ Here's how to get started with your code contribution:
3232

3333
1. Create your own fork of go-redis
3434
2. Do the changes in your fork
35-
3. If you need a development environment, run `make test`. Note: this clones and builds the latest release of [redis](https://redis.io). You also need a redis-stack-server docker, in order to run the capabilities tests. This can be started by running:
36-
```docker run -p 6379:6379 -it redis/redis-stack-server:edge```
37-
4. While developing, make sure the tests pass by running `make tests`
35+
3. If you need a development environment, run `make docker.start`.
36+
37+
> Note: this clones and builds the docker containers specified in `docker-compose.yml`, to understand more about
38+
> the infrastructure that will be started you can check the `docker-compose.yml`. You also have the possiblity
39+
> to specify the redis image that will be pulled with the env variable `CLIENT_LIBS_TEST_IMAGE`.
40+
> By default the docker image that will be pulled and started is `redislabs/client-libs-test:rs-7.4.0-v2`.
41+
> If you want to test with newer Redis version, using a newer version of `redislabs/client-libs-test` should work out of the box.
42+
43+
4. While developing, make sure the tests pass by running `make test` (if you have the docker containers running, `make test.ci` may be sufficient).
44+
> Note: `make test` will try to start all containers, run the tests with `make test.ci` and then stop all containers.
3845
5. If you like the change and think the project could use it, send a
3946
pull request
4047

4148
To see what else is part of the automation, run `invoke -l`
4249

50+
4351
## Testing
4452

45-
Call `make test` to run all tests, including linters.
53+
### Setting up Docker
54+
To run the tests, you need to have Docker installed and running. If you are using a host OS that does not support
55+
docker host networks out of the box (e.g. Windows, OSX), you need to set up a docker desktop and enable docker host networks.
56+
57+
### Running tests
58+
Call `make test` to run all tests.
4659

4760
Continuous Integration uses these same wrappers to run all of these
48-
tests against multiple versions of python. Feel free to test your
61+
tests against multiple versions of redis. Feel free to test your
4962
changes against all the go versions supported, as declared by the
5063
[build.yml](./.github/workflows/build.yml) file.
5164

0 commit comments

Comments
 (0)