Skip to content

Commit e30971b

Browse files
committed
merging master
2 parents f6aa3b4 + e0d3ba5 commit e30971b

File tree

111 files changed

+16653
-5754
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+16653
-5754
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ _Please make sure to review and check all of these items:_
66
- [ ] Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
77
- [ ] Is the new or changed code fully tested?
88
- [ ] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
9+
- [ ] Is there an example added to the examples folder (if applicable)?
910

1011
_NOTE: these things are not required to open a PR and can be done
1112
afterwards / while the PR is open._

.github/workflows/install_and_test.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,8 @@ cd ${TESTDIR}
3838

3939
# install, run tests
4040
pip install ${PKG}
41-
pytest
41+
# Redis tests
42+
pytest -m 'not onlycluster'
43+
# RedisCluster tests
44+
CLUSTER_URL="redis://localhost:16379/0"
45+
pytest -m 'not onlynoncluster and not redismod and not ssl' --redis-url=${CLUSTER_URL}

.github/workflows/integration.yaml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ jobs:
3434
max-parallel: 6
3535
matrix:
3636
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', 'pypy-3.7']
37+
test-type: ['standalone', 'cluster']
38+
connection-type: ['hiredis', 'plain']
3739
env:
3840
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
39-
name: Python ${{ matrix.python-version }} tests
41+
name: Python ${{ matrix.python-version }} ${{matrix.test-type}}-${{matrix.connection-type}} tests
4042
steps:
4143
- uses: actions/checkout@v2
4244
- name: install python
@@ -46,7 +48,8 @@ jobs:
4648
- name: run tests
4749
run: |
4850
pip install -r dev_requirements.txt
49-
invoke tests
51+
bash docker/stunnel/create_certs.sh
52+
tox -e ${{matrix.test-type}}-${{matrix.connection-type}}
5053
- name: Upload codecov coverage
5154
uses: codecov/codecov-action@v2
5255
with:
@@ -68,3 +71,19 @@ jobs:
6871
- name: Run installed unit tests
6972
run: |
7073
bash .github/workflows/install_and_test.sh ${{ matrix.extension }}
74+
75+
install_package_from_commit:
76+
name: Install package from commit hash
77+
runs-on: ubuntu-latest
78+
strategy:
79+
matrix:
80+
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', 'pypy-3.7']
81+
steps:
82+
- uses: actions/checkout@v2
83+
- name: install python ${{ matrix.python-version }}
84+
uses: actions/setup-python@v2
85+
with:
86+
python-version: ${{ matrix.python-version }}
87+
- name: install from pip
88+
run: |
89+
pip install --quiet git+${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git@${GITHUB_SHA}

.github/workflows/pypi-publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: install python
1414
uses: actions/setup-python@v2
1515
with:
16-
python-version: 3.0
16+
python-version: 3.9
1717
- name: Install dev tools
1818
run: |
1919
pip install -r dev_requirements.txt
@@ -22,7 +22,7 @@ jobs:
2222
- name: Build package
2323
run: |
2424
python setup.py build
25-
python setup.py dist bdist_wheel
25+
python setup.py sdist bdist_wheel
2626
2727
- name: Publish to Pypi
2828
uses: pypa/gh-action-pypi-publish@release/v1

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ env
1515
venv
1616
coverage.xml
1717
.venv
18+
*.xml
19+
.coverage*
20+
docker/stunnel/keys

CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ can execute docker and its various commands.
5858
- A Redis replica node
5959
- Three sentinel Redis nodes
6060
- A multi-python docker, with your source code mounted in /data
61+
- An stunnel docker, fronting the master Redis node
6162

6263
The replica node, is a replica of the master node, using the
6364
[leader-follower replication](https://redis.io/topics/replication)
@@ -68,6 +69,14 @@ configuration](https://redis.io/topics/sentinel).
6869

6970
## Testing
7071

72+
Call `invoke tests` to run all tests, or `invoke all-tests` to run linters
73+
tests as well. With the 'tests' and 'all-tests' targets, all Redis and
74+
RedisCluster tests will be run.
75+
76+
It is possible to run only Redis client tests (with cluster mode disabled) by
77+
using `invoke standalone-tests`; similarly, RedisCluster tests can be run by using
78+
`invoke cluster-tests`.
79+
7180
Each run of tox starts and stops the various dockers required. Sometimes
7281
things get stuck, an `invoke clean` can help.
7382

0 commit comments

Comments
 (0)