Skip to content

Commit

Permalink
Updating dependencies and docker builds (#461)
Browse files Browse the repository at this point in the history
* dependency update

* fail fast false

* pendulum bump
  • Loading branch information
chayim authored Oct 30, 2023
1 parent f53d421 commit f8fd005
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 50 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tests
scripts
CHANGELOG.md
Dockerfile
docs
pyoxidizer.template.bzl
redis-doc
5 changes: 3 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ jobs:
test:
name: Pytest
strategy:
fail-fast: false
matrix:
os: ["ubuntu-20.04"]
python: ["3.7", "3.8", "3.9", "3.10", "3.11.1"]
redis: [5, 6, 7]
python: ["3.7", "3.8", "3.9", "3.10", "3.11.1", "3.12.0"]
redis: [5, 6, 7, 7.2]
runs-on: ${{ matrix.os }}

services:
Expand Down
28 changes: 13 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
FROM python:3
FROM redis/redis-stack-server:latest

WORKDIR /iredis
COPY README.md poetry.lock pyproject.toml ./
COPY iredis ./iredis

RUN apt-get update && apt-get install -y --allow-unauthenticated \
redis-server && \
rm -rf /var/lib/apt/lists/*
COPY . /iredis

RUN apt-get update --fix-missing
RUN apt-get install -yqq python3 python3-pip python-is-python3
RUN python3 -m pip install poetry
WORKDIR /iredis
RUN poetry config virtualenvs.create false
RUN poetry build
RUN pip install dist/iredis*.tar.gz
WORKDIR /
RUN rm -rf .cache /var/cache/apt
RUN rm -rf /iredis

RUN python3 -m venv iredis_env && \
. iredis_env/bin/activate && \
pip install poetry && \
poetry install --no-dev && \
rm -rf ~/.cache

CMD ["sh","-c","redis-server --daemonize yes && . iredis_env/bin/activate && iredis"]
CMD ["sh", "-c", "/opt/redis-stack/bin/redis-stack-server --daemonize yes && iredis"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<p align="center">
<a href="https://github.com/laixintao/iredis/actions"><img src="https://github.com/laixintao/iredis/workflows/Test/badge.svg" alt="Github Action"></a>
<a href="https://badge.fury.io/py/iredis"><img src="https://badge.fury.io/py/iredis.svg" alt="PyPI version"></a>
<img src="https://badgen.net/badge/python/3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9%20%7C%203.10/" alt="Python version">
<img src="https://badgen.net/badge/python/3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10/" alt="Python version">
<a href="https://pepy.tech/project/iredis"><img src="https://pepy.tech/badge/iredis" alt="Download stats"></a>
</p>

Expand Down
34 changes: 5 additions & 29 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Database",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
]

packages = [
{ include = "iredis" },
{ include = "tests", format = "sdist" },
]

[tool.poetry.dependencies]
Expand All @@ -36,11 +37,11 @@ Pygments = "^2"
mistune = "^3.0"
configobj = "^5.0"
click = "^8.0"
pendulum = "^2.0"
pendulum = "^2.1.0"
# wcwidth 0.2.x uses pkg_resources which is not supported by PyOxidizer
wcwidth = "0.1.9"
packaging = "^23.0"
redis = "^4.5.3"
redis = "^5.0.0"

[tool.poetry.dev-dependencies]
pytest = "^7.2"
Expand Down

0 comments on commit f8fd005

Please sign in to comment.