Skip to content

Commit

Permalink
workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
amirreza8002 committed Sep 21, 2024
1 parent 508e0c8 commit 17323e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ jobs:

- name: tests
run: |
sudo sysctl vm.overcommit_memory=1
VALKEY_PRIMARY=$(tests/start_valkey.sh)
VALKEY_SENTINEL=$(tests/start_valkey.sh --sentinel)
CONTAINERS="$VALKEY_PRIMARY $VALKEY_SENTINEL"
trap "docker stop $CONTAINERS && docker rm $CONTAINERS" EXIT
trap "sudo docker logs --details $VALKEY_PRIMARY && docker stop $CONTAINERS && docker rm $CONTAINERS" EXIT
tests/wait_for_valkey.sh $VALKEY_PRIMARY 6379
tests/wait_for_valkey.sh $VALKEY_SENTINEL 26379
Expand Down
3 changes: 3 additions & 0 deletions tests/start_valkey.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ if [[ $SENTINEL == 0 ]]; then
ARGS=("${ARGS[@]}" --unixsocket /tmp/valkey.sock --unixsocketperm 777)
fi

sudo chown $(id -u):$(id -g) -R /data
sudo chmod -R 777 /data

# start valkey
sudo docker run \
--health-cmd "valkey-cli -p $PORT:$PORT ping" \
Expand Down

0 comments on commit 17323e0

Please sign in to comment.