Skip to content

Commit

Permalink
test newer versions
Browse files Browse the repository at this point in the history
  • Loading branch information
amirreza8002 committed Sep 16, 2024
1 parent aa84968 commit b5eb9c8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ jobs:
- '5.1'
valkey-version:
- 'latest'
- '7.2.6'
- 'unstable'

# Only test pre-release dependencies for the latest Python.
include:
# latest Django with pre-release valkey
- django-version: '5.0'
valkey-version: 'master'
python-version: '3.11'
- django-version: '5.1'
valkey-version: 'unstable'
python-version: '3.12'

# latest valkey with pre-release Django
- django-version: 'main'
Expand All @@ -34,8 +36,13 @@ jobs:

# pre-release Django and valkey
- django-version: 'main'
valkey-version: 'master'
python-version: '3.11'
valkey-version: 'unstable'
python-version: '3.12'

# 7.2.6 valkey with stable django
- django-version: '5.1'
valkey-version: '7.2.6'
python-version: '3.12'

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -69,8 +76,8 @@ jobs:

- name: tests
run: |
VALKEY_PRIMARY=$(tests/start_valkey.sh)
VALKEY_SENTINEL=$(tests/start_valkey.sh --sentinel)
VALKEY_PRIMARY=$(tests/start_valkey.sh --normal ${{ matrix.valkey-version }})
VALKEY_SENTINEL=$(tests/start_valkey.sh --sentinel ${{ matrix.valkey-version }})
CONTAINERS="$VALKEY_PRIMARY $VALKEY_SENTINEL"
trap "docker stop $CONTAINERS && docker rm $CONTAINERS" EXIT
tests/wait_for_valkey.sh $VALKEY_PRIMARY 6379
Expand Down
4 changes: 3 additions & 1 deletion tests/start_valkey.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ if ! command -v docker &> /dev/null; then
exit 1
fi

VERSION=$2

ARGS=()
PORT=6379
SENTINEL=0
Expand Down Expand Up @@ -50,4 +52,4 @@ sudo docker run \
--network host \
--user $(id -u):$(id -g) \
--volume /tmp:/tmp \
--detach valkey/valkey valkey-server "${ARGS[@]}"
--detach valkey/valkey:"${VERSION}" valkey-server "${ARGS[@]}"

0 comments on commit b5eb9c8

Please sign in to comment.