From 080e8e9926dab93ed7e5cdec28a01a7ad9d44fd6 Mon Sep 17 00:00:00 2001 From: Jeronimo Irazabal Date: Tue, 29 Nov 2022 11:20:29 -0300 Subject: [PATCH] chore: run immudb in docker Signed-off-by: Jeronimo Irazabal --- .github/workflows/gradle.yml | 2 ++ build.gradle | 32 ++------------------------------ 2 files changed, 4 insertions(+), 30 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 1f52101..539d701 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -20,6 +20,8 @@ jobs: uses: actions/setup-java@v1 with: java-version: 1.8 + - name: Start immudb container + run: docker run -d --health-cmd "immuadmin status" --health-interval 10s --health-timeout 5s --health-retries 5 -p 3322:3322 codenotary/immudb:1.4.0 - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle diff --git a/build.gradle b/build.gradle index b7d84c8..eae470a 100644 --- a/build.gradle +++ b/build.gradle @@ -120,32 +120,6 @@ dependencies { implementation 'javax.annotation:javax.annotation-api:1.2-b01' } -task immudbStart { - // INFO: You can disable this logic (comment these lines below within this task) - // if you want to use an existing immudb server, without starting and stopping - // the locally used immudb version (stored in `immudb` directory and controlled - // through the scripts). Just make sure immudb server has the proper version. - ProcessBuilder pb = new ProcessBuilder() - pb.command("/bin/bash", "immudb/clean.sh") - Process procClean = pb.start() - procClean.waitFor() - - pb = new ProcessBuilder() - pb.command("/bin/bash", "immudb/start.sh") - Process proc = pb.start() - proc.waitFor(15, TimeUnit.SECONDS) -} - -task immudbStop(type: Exec) { - // INFO: You can disable this logic (comment these lines below within this task) - // if you want to use an existing immudb server, without starting and stopping - // the locally used immudb version (stored in `immudb` directory and controlled - // through the scripts). Just make sure immudb server has the proper version. - workingDir 'immudb' - commandLine './clean.sh' -} - - idea { module { sourceDirs += file("${projectDir}/src/generated/main/java") @@ -166,9 +140,7 @@ test { } } -test.dependsOn immudbStart - -test.finalizedBy([jacocoTestReport, immudbStop]) +test.finalizedBy([jacocoTestReport]) task integrationTest(type: Test) { testClassesDirs = sourceSets.integrationTest.output.classesDirs @@ -259,4 +231,4 @@ publishing { signing { sign publishing.publications.gpr } -} +} \ No newline at end of file