Skip to content

Commit

Permalink
Do not rely on Redis compiled from source code
Browse files Browse the repository at this point in the history
Issue redis#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.
  • Loading branch information
Gabriel Erzse committed Feb 21, 2024
1 parent 65d431f commit e5776d0
Show file tree
Hide file tree
Showing 26 changed files with 808 additions and 625 deletions.
35 changes: 9 additions & 26 deletions .github/workflows/integration.yml
Expand Up @@ -22,20 +22,21 @@ on:
jobs:

build:
name: Build and Test
name: Build and Test - Redis Stack ${{matrix.redis-stack-version}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
redis-stack-version: ['6.2.6-v9', '7.2.0-RC3', 'edge']
env:
REDIS_STACK_VERSION: ${{matrix.redis-stack-version}}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- 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
sudo apt install -y stunnel make
make system-setup
- name: Cache dependencies
uses: actions/cache@v2
with:
Expand All @@ -51,28 +52,10 @@ jobs:
mvn javadoc:jar
- name: Run tests
run: |
TEST="" make test
make test
env:
JVM_OPTS: -Xmx3200m
TERM: dumb
- name: sleep 10s
run: sleep 10s
- name: Make - start
run: |
make start
sleep 2s
- 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
- 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
- name: Make - stop
run: make stop
- name: Codecov
run: |
bash <(curl -s https://codecov.io/bash)
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -15,3 +15,4 @@ tags
*.rdb
redis-git
appendonlydir/
testmodule.so

0 comments on commit e5776d0

Please sign in to comment.