Skip to content

Commit

Permalink
proper smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Kusumgar committed Nov 7, 2024
1 parent 785e6c0 commit b178401
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ jobs:
tags: |
ghcr.io/${{env.TAG_GHCR}}:${{steps.ci-env.outputs.CI_SHA}}
ghcr.io/${{env.TAG_GHCR}}:${{steps.ci-env.outputs.CI_BRANCH}}
- name: Smoke test
run: |
./scripts/run-version.sh --app ${{steps.ci-env.outputs.CI_BRANCH}} &
curl http://localhost:3000 | grep "Example WODIN configuration"
./scripts/smoke-test.sh
17 changes: 17 additions & 0 deletions scripts/smoke-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

retries=10
sleep 5;

while ((retries > 0)); do
curl http://localhost:3000 | grep "Example WODIN configuration" && break

echo "retrying connection with server in 1 seconds"
sleep 1
((retries --))
done

if ((retries == 0 )); then
echo "Didn't get expected response from the server"
exit 1
fi

0 comments on commit b178401

Please sign in to comment.