Skip to content

Commit

Permalink
Merge pull request #219 from Chia-Network/test
Browse files Browse the repository at this point in the history
Add simple docker status check to PR CI
  • Loading branch information
Starttoaster authored Dec 7, 2023
2 parents 3f66fb4 + 7814dd7 commit 511e3af
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/chia-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,22 @@ jobs:
});
return release.data.tag_name;
- run: docker build --build-arg BRANCH="${{ steps.tag.outputs.result }}" .
- run: docker build --build-arg BRANCH="${{ steps.tag.outputs.result }}" -t localtest:latest .

- run: docker run -d --name=chia localtest:latest

- timeout-minutes: 10
run: |
while true; do
HEALTH_STATUS=$(docker inspect --format="{{.State.Health.Status}}" chia)
if [ "$HEALTH_STATUS" == "starting" ]; then
echo "Container chia is still starting. Waiting..."
sleep 1
elif [ "$HEALTH_STATUS" == "healthy" ]; then
echo "Health check succeeded for container chia"
break
else
echo "Health check failed for container chia"
exit 1
fi
done

0 comments on commit 511e3af

Please sign in to comment.