Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Replace redis with valkey and run tests with valkey service (#18500)
lucas-dzif34f20f8e24b
diff --git a/.devcontainer/backend.env b/.devcontainer/backend.envindex dddd0ad774..6d4563fc72 100644--- a/.devcontainer/backend.env+++ b/.devcontainer/backend.env@@ -1,7 +1,8 @@DATABASE_URL=postgres://saleor:saleor@db/saleorDASHBOARD_URL=http://localhost:9000/-CELERY_BROKER_URL=redis://redis:6379/1+CACHE_URL=redis://cache:6379/0+CELERY_BROKER_URL=redis://cache:6379/1SECRET_KEY=changeme# MailpitEMAIL_URL=smtp://mailpit:1025diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.jsonindex 9ff09863a7..06da09e2f1 100644--- a/.devcontainer/devcontainer.json+++ b/.devcontainer/devcontainer.json@@ -7,7 +7,8 @@8000,"dashboard:9000","mailpit:8025",- "db:5432"+ "db:5432",+ "cache:6379"],"portsAttributes": {"8000": {diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.ymlindex e338f0dd00..5ffc564869 100644--- a/.devcontainer/docker-compose.yml+++ b/.devcontainer/docker-compose.yml@@ -1,5 +1,3 @@-version: "3.4"-services:saleor:image: saleor@@ -12,7 +10,7 @@ services:- backend.envdepends_on:- db- - redis+ - cachevolumes:- ..:/app@@ -25,7 +23,7 @@ services:db:image: library/postgres:15-alpineports:- - 5432:5432+ - 5432:5432restart: unless-stoppedvolumes:- saleor-db:/var/lib/postgresql/data@@ -33,11 +31,11 @@ services:- POSTGRES_USER=saleor- POSTGRES_PASSWORD=saleor- redis:- image: library/redis:7.0-alpine+ cache:+ image: valkey/valkey:8.1-alpinerestart: unless-stoppedvolumes:- - saleor-redis:/data+ - saleor-cache:/dataports:- 6379:6379@@ -51,5 +49,5 @@ services:volumes:saleor-db:driver: local- saleor-redis:+ saleor-cache:driver: localdiff --git a/.env.example b/.env.exampleindex cd8ff2b196..3dccc32b2e 100644--- a/.env.example+++ b/.env.example@@ -1,3 +1,4 @@+CACHE_URL=redis://localhost:6379/0CELERY_BROKER_URL=redis://localhost:6379/1EMAIL_URL=smtp://localhost:1025diff --git a/.github/workflows/tests-and-linters.yml b/.github/workflows/tests-and-linters.ymlindex d837d579c1..0101625501 100644--- a/.github/workflows/tests-and-linters.yml+++ b/.github/workflows/tests-and-linters.yml@@ -24,6 +24,7 @@ on:env:BENCH_PATH: ./queries-results.json+ CACHE_URL: "redis://cache:6379/0"DATABASE_URL: "postgres://saleor:saleor@postgres:5432/saleor"SECRET_KEY: ci-test@@ -50,6 +51,13 @@ jobs:--health-interval 10s--health-timeout 5s--health-retries 5+ cache:+ image: valkey/valkey:8.1-alpine+ options: >-+ --health-cmd "valkey-cli ping | grep PONG"+ --health-interval 10s+ --health-timeout 5s+ --health-retries 5steps:- uses: actions/checkout@v5diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 8dd173fac3..217d5a0e9b 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -47,7 +47,7 @@ Clone this [repository](https://github.com/saleor/saleor) and setup database and```shellcd .devcontainer-docker compose up db dashboard redis mailpit+docker compose up db dashboard cache mailpit```To create virtualenv and install dependencies run in root of the repository:diff --git a/setup.cfg b/setup.cfgindex f52e1ca3e6..bf3893381f 100644--- a/setup.cfg+++ b/setup.cfg@@ -16,7 +16,7 @@ exclude_lines =@overload[tool:pytest]-addopts = -n auto --record-mode=none --ds=saleor.tests.settings --disable-socket --allow-unix-socket --pdbcls=IPython.terminal.debugger:TerminalPdb+addopts = -n auto --record-mode=none --ds=saleor.tests.settings --disable-socket --allow-hosts 127.0.0.1,::1,cache --allow-unix-socket --pdbcls=IPython.terminal.debugger:TerminalPdbasyncio_mode = autoasyncio_default_fixture_loop_scope = fixturetestpaths = saleor