Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 52 additions & 11 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
redis-version: ['5.0', '6.0', '6.2', '7.0', 'unstable']
steps:
- uses: actions/checkout@v2
- name: Set up publishing to maven central
Expand All @@ -34,7 +38,7 @@ jobs:
run: |
sudo apt update
sudo apt install -y stunnel make
make system-setup
make system-setup REDIS_VERSION=${{matrix.redis-version}}
- name: Cache dependencies
uses: actions/cache@v2
with:
Expand All @@ -47,27 +51,64 @@ jobs:
mvn -q dependency:go-offline
- name: Build docs
run: |
mvn javadoc:jar
mvn -q javadoc:jar
- name: Run tests
run: |
TEST="" make test
TEST="" make test REDIS_VERSION=${{matrix.redis-version}}
env:
JVM_OPTS: -Xmx3200m
TERM: dumb
- name: Make - start
run: make start
- name: Docker - mod or stack
run: docker run -p 52567:6379 -d redis/redis-stack-server:edge
- name: Test commands - default protocol
run: mvn -Dtest="redis.clients.jedis.commands.**" test
- name: Test commands - RESP3 protocol
run: mvn -DjedisProtocol=3 -Dtest="redis.clients.jedis.commands.**" test
run: mvn -q -Dtest="redis.clients.jedis.commands.**" test
- name: Test module commands - default protocol
run: mvn -DmodulesDocker="localhost:52567" -Dtest="redis.clients.jedis.modules.**" test
- name: Test module commands - RESP3 protocol
run: mvn -DjedisProtocol=3 -DmodulesDocker="localhost:52567" -Dtest="redis.clients.jedis.modules.**" test
if: ${{matrix.redis-version == 'unstable'}}
run: mvn -q -DmodulesDocker="localhost:52567" -Dtest="redis.clients.jedis.modules.**" test
- name: Make - stop
run: make stop
- name: Codecov
run: |
bash <(curl -s https://codecov.io/bash)

resp-3:
name: RESP3 Tests
runs-on: ubuntu-latest
services:
redis-stack:
image: redis/redis-stack-server:edge
ports:
- 52567:6379
steps:
- uses: actions/checkout@v2
- name: Set up publishing to maven central
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'temurin'
- name: System setup
run: |
sudo apt update -yqq
sudo apt install -yqq stunnel make
make system-setup
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.m2/repository
/var/cache/apt
key: jedis-${{hashFiles('**/pom.xml')}}
- name: Maven offline
run: |
mvn -q dependency:go-offline
- name: Build docs
run: |
mvn -q javadoc:jar
- name: Make - start
run: make start
- name: Test commands - RESP3 protocol
run: mvn -q -DjedisProtocol=3 -Dtest="redis.clients.jedis.commands.**" test
- name: Test module commands - RESP3 protocol
run: mvn -q -DjedisProtocol=3 -DmodulesDocker="localhost:52567" -Dtest="redis.clients.jedis.modules.**" test
- name: Make - stop
run: make stop
19 changes: 17 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
PATH := ./redis-git/src:${PATH}
STUNNEL_BIN := $(shell which stunnel)
REDIS_VERSION := unstable

ifeq (${REDIS_VERSION},unstable)
define REDIS1_CONF
daemonize yes
protected-mode no
Expand All @@ -14,6 +16,19 @@ appendonly no
enable-module-command yes
client-output-buffer-limit pubsub 256k 128k 5
endef
else
define REDIS1_CONF
daemonize yes
protected-mode no
port 6379
requirepass foobared
pidfile /tmp/redis1.pid
logfile /tmp/redis1.log
save ""
appendonly no
client-output-buffer-limit pubsub 256k 128k 5
endef
endif

define REDIS2_CONF
daemonize yes
Expand Down Expand Up @@ -464,8 +479,8 @@ release:
make stop

system-setup:
sudo apt install -y gcc g++
[ ! -e redis-git ] && git clone https://github.com/redis/redis.git --branch unstable --single-branch redis-git || true
sudo apt install -qqy gcc g++
[ ! -e redis-git ] && git clone https://github.com/redis/redis.git --branch ${REDIS_VERSION} --single-branch redis-git || true
$(MAKE) -C redis-git clean
$(MAKE) -C redis-git

Expand Down