-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reuse the docker-compose section into a separate github action workflow
- Loading branch information
Showing
3 changed files
with
48 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Set up Presto and Trino servers | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
setup-presto-trino-servers: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Install Docker Compose on Ubuntu | ||
- name: Install Docker Compose on Ubuntu | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y docker-compose | ||
# Start Docker Compose services | ||
- name: Start services with Docker Compose | ||
run: | | ||
docker-compose up -d | ||
# Ensure Presto and Trino servers are running | ||
- name: Wait for Presto and Trino to be ready | ||
run: | | ||
for i in {1..30}; do | ||
if curl -s http://localhost:8080/v1/info && curl -s http://localhost:8090/v1/info; then | ||
echo "Presto and Trino are up and running." | ||
break | ||
fi | ||
echo "Waiting for Presto and Trino to be ready..." | ||
sleep 5 | ||
done | ||
if ! curl -s http://localhost:8080/v1/info || ! curl -s http://localhost:8090/v1/info; then | ||
echo "Presto or Trino did not start in time. Exiting." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters