Skip to content

Commit

Permalink
packagin set up, dependencies, project name changed for valkey, delet…
Browse files Browse the repository at this point in the history
…ed setuptools files
  • Loading branch information
amirreza8002 committed Oct 12, 2024
1 parent 13cef45 commit 74f52f5
Show file tree
Hide file tree
Showing 19 changed files with 165 additions and 162 deletions.
46 changes: 22 additions & 24 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,61 +15,59 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
services:
redis:
image: redis
valkey:
image: valkey/valkey
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-cmd "valkey-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
sentinel:
image: bitnami/redis-sentinel
image: bitnami/valkey-sentinel
ports:
- 26379:26379
options: >-
--health-cmd "redis-cli -p 26379 ping"
--health-cmd "valkey-cli -p 26379 ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
REDIS_MASTER_HOST: redis
REDIS_MASTER_SET: sentinel
REDIS_SENTINEL_QUORUM: "1"
REDIS_SENTINEL_PASSWORD: channels_redis
# VALKEY_MASTER_HOST: valkey
# VALKEY_MASTER_SET: sentinel
VALKEY_SENTINEL_QUORUM: "1"
VALKEY_SENTINEL_PASSWORD: channels_valkey

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v3

- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools tox
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
poetry install --no-interaction --all-extras --with dev
- name: Run tox targets for ${{ matrix.python-version }}
run: |
ENV_PREFIX=$(tr -C -d "0-9" <<< "${{ matrix.python-version }}")
TOXENV=$(tox --listenvs | grep "^py$ENV_PREFIX" | tr '\n' ',') python -m tox
TOXENV=$(tox --listenvs | grep "^py$ENV_PREFIX" | tr '\n' ',') poetry run tox
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip tox
- name: Run lint
run: tox -e qa
- uses: actions/checkout@v4
- uses: chartboost/ruff-actions@v1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ build/
.pytest_cache
.vscode
.idea
poetry.lock
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repos:
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.21.0
hooks:
- id: django-upgrade
args: [--target-version, "5.1"]

- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
- id: black

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.8
hooks:
- id: ruff
7 changes: 7 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
0.1.0
-----

* package forked from channels_redis and switched to work as a valkey backend

channels_redis:

4.2.0 (2024-01-12)
------------------

Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

Loading

0 comments on commit 74f52f5

Please sign in to comment.