Skip to content

Commit 9286d0c

Browse files
author
Gabriel Erzse
committed
Do not rely on Redis compiled from source code
Issue #3710 Instead of building Redis server from source code, use Docker images. Prepare docker-compose stacks that accept the version of the Docker image as parameter, so we can run against multiple versions in CI. The purpose of this change is to strictly move everything to Docker, without trying to change anything else. Some Java tests had to be adapted, still, because now the Redis instances are accessed via localhost, while internally in the docker-compose network they see each other with other IPs and ports. Polish a bit the Makefile, for example to run exactly the same thing that runs in CI, so when we run the tests locally we get exactly the same coverage.
1 parent 65d431f commit 9286d0c

26 files changed

+808
-625
lines changed

.github/workflows/integration.yml

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,21 @@ on:
2222
jobs:
2323

2424
build:
25-
name: Build and Test
25+
name: Build and Test - Redis Stack ${{matrix.redis-stack-version}}
2626
runs-on: ubuntu-latest
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
redis-stack-version: ['6.2.6-v12', '7.2.0-v8', 'edge']
31+
env:
32+
REDIS_STACK_VERSION: ${{matrix.redis-stack-version}}
2733
steps:
28-
- uses: actions/checkout@v2
34+
- uses: actions/checkout@v4
2935
- name: Set up publishing to maven central
3036
uses: actions/setup-java@v2
3137
with:
3238
java-version: '8'
3339
distribution: 'temurin'
34-
- name: System setup
35-
run: |
36-
sudo apt update
37-
sudo apt install -y stunnel make
38-
make system-setup
3940
- name: Cache dependencies
4041
uses: actions/cache@v2
4142
with:
@@ -51,28 +52,10 @@ jobs:
5152
mvn javadoc:jar
5253
- name: Run tests
5354
run: |
54-
TEST="" make test
55+
make test
5556
env:
5657
JVM_OPTS: -Xmx3200m
5758
TERM: dumb
58-
- name: sleep 10s
59-
run: sleep 10s
60-
- name: Make - start
61-
run: |
62-
make start
63-
sleep 2s
64-
- name: Docker - mod or stack
65-
run: docker run -p 52567:6379 -d redis/redis-stack-server:edge
66-
- name: Test commands - default protocol
67-
run: mvn -Dtest="redis.clients.jedis.commands.**" test
68-
- name: Test commands - RESP3 protocol
69-
run: mvn -DjedisProtocol=3 -Dtest="redis.clients.jedis.commands.**" test
70-
- name: Test module commands - default protocol
71-
run: mvn -DmodulesDocker="localhost:52567" -Dtest="redis.clients.jedis.modules.**" test
72-
- name: Test module commands - RESP3 protocol
73-
run: mvn -DjedisProtocol=3 -DmodulesDocker="localhost:52567" -Dtest="redis.clients.jedis.modules.**" test
74-
- name: Make - stop
75-
run: make stop
7659
- name: Codecov
7760
run: |
7861
bash <(curl -s https://codecov.io/bash)

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ tags
1515
*.rdb
1616
redis-git
1717
appendonlydir/
18+
*.so

0 commit comments

Comments
 (0)