Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
Signed-off-by: Yury-Fridlyand <[email protected]>
  • Loading branch information
Yury-Fridlyand committed Jan 17, 2024
1 parent 645d280 commit c2328fa
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 1 deletion.
33 changes: 32 additions & 1 deletion .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,32 @@ jobs:
with:
redis-version: ${{ matrix.redis }}

- name: Start redis
run: |
redis-server --daemonize yes
mkdir cluster-test
cd cluster-test
mkdir 7000 7001 7002 7003 7004 7005
for port in {7000..7005}; do
pushd $port
cat << EOF > redis.conf
port $port
cluster-enabled yes
daemonize yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
dir $PWD
pidfile $PWD/redis.pid
logfile $PWD/redis.log
EOF
redis-server redis.conf &
popd
done
ps axwwu | grep [r]edis
redis-cli --cluster create 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005 --cluster-replicas 1 --cluster-yes
redis-cli -c -p 7000 cluster slots
- name: Build rust part
working-directory: java
run: cargo build --release
Expand All @@ -72,15 +98,20 @@ jobs:
working-directory: java
run: ./gradlew --continue build

- name: Stop redis
if: always()
run: sudo killall -9 redis-server

- name: Upload test reports
if: always()
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: test-reports-${{ matrix.java }}
name: test-reports-java-${{ matrix.java }}-redis-${{ matrix.redis }}-${{ matrix.os }}
path: |
java/client/build/reports/**
java/integTest/build/reports/**
cluster-test/**
build-amazonlinux-latest:
if: github.repository_owner == 'aws'
Expand Down
29 changes: 29 additions & 0 deletions java/integTest/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
plugins {
id 'java-library'
}

repositories {
mavenCentral()
}

dependencies {
// client
implementation project(':client')

// lombok
testCompileOnly 'org.projectlombok:lombok:1.18.30'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.30'

// junit
testImplementation 'org.junit.jupiter:junit-jupiter:5.6.2'
testImplementation 'org.mockito:mockito-junit-jupiter:3.12.4'
}

tasks.withType(Test) {
testLogging {
exceptionFormat "full"
events "started", "skipped", "passed", "failed"
showStandardStreams true
}
jvmArgs "-Djava.library.path=${projectDir}/../target/release:${projectDir}/../target/debug"
}

0 comments on commit c2328fa

Please sign in to comment.