Skip to content

Commit

Permalink
some fixes, adding a step to stop the container, removing app.logs ch…
Browse files Browse the repository at this point in the history
…eck since relies on gradle

Signed-off-by: Atanas Atanasov <[email protected]>
  • Loading branch information
ata-nas committed Oct 7, 2024
1 parent b61b79a commit 001d5eb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/smoke-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,14 @@ jobs:
run: ${{ env.GRADLE_EXEC }} clean :server:build -x test

- name: Create and Run Smoke Test Container
run: ${{ env.GRADLE_EXEC }} runSmokeTests 2> server/src/test/resources/app.log < /dev/null &
run: ${{ env.GRADLE_EXEC }} runSmokeTests &
echo "Application started with PID $APP_PID"
sleep 10

- name: Print App Logs
run: cat server/src/test/resources/app.log

- name: Smoke Test
working-directory: server/src/test/resources/
run: ./smoke-test.sh app.log
run: ./smoke-test.sh

# TODO do we need to stop this container? In theory when the job runs, everything gets scrapped
- name: Stop Docker Container
run: ${{ env.GRADLE_EXEC }} stopDockerContainer
5 changes: 5 additions & 0 deletions server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ tasks.register("runSmokeTests") {
project.version,
layout.projectDirectory.dir("..").asFile
)
commandLine(
"sh",
"-c",
"docker compose -p block-node up -d"
)
}
println("Build completed using src/test/resources/app.properties")
}
Expand Down

0 comments on commit 001d5eb

Please sign in to comment.