Skip to content

Commit

Permalink
Issue #14: Migrate to GitHub Actions
Browse files Browse the repository at this point in the history
- Move wait script to separate step and add more debug output
  • Loading branch information
reckart committed Mar 19, 2024
1 parent 9f1accb commit 1812e4d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,26 @@ jobs:
run: make lint

- name: Deploy INCEpTION for integration tests
timeout-minutes: 5
run: |
docker pull ghcr.io/inception-project/inception:latest
docker run --name inception -d \
-e JAVA_OPTS='-Dremote-api.enabled=true -Dsecurity.default-admin-username=test-remote -Dsecurity.default-admin-password={bcrypt}\$2a\$12\$fQ.9x17xCGbrGtvw45H20uMqbEjhLIPfoa13bLfM33e./nVuNvCWa -Dsecurity.default-admin-remote-access=true' \
-p8080:8080 \
ghcr.io/inception-project/inception:latest
- name: Wait for INCEpTION to have started
timeout-minutes: 5
run: |
while true; do
response=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:8080/actuator/health)
echo "Checking if service is available... $response"
if [ "$response" -eq 200 ]; then
health=$(curl -s http://localhost:8080/actuator/health)
echo "Checking if service is healthy... health"
if [[ "$health" == *"\"status\":\"UP\""* ]]; then
echo "Service is healthy."
break
fi
fi
echo "Waiting for service to become healthy..."
sleep 5
done
- name: Run tests
Expand Down

0 comments on commit 1812e4d

Please sign in to comment.