Skip to content

Commit

Permalink
Build benchmark and wait for data initialization before running bench…
Browse files Browse the repository at this point in the history
…mark
  • Loading branch information
catatsuy committed Feb 10, 2024
1 parent d6bf51a commit a95e19d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,23 @@ jobs:
cd webapp
docker compose up -d
- name: Build the benchmark
run: |
cd benchmarker
docker build -t private-isu-benchmarker .
- name: Wait for data initialization to complete
run: |
cd webapp
until docker compose exec -T mysql mysql -uroot -proot -e "SELECT 1 FROM posts LIMIT 1;" isuconp; do
echo "Waiting for database initialization..."
sleep 10
done
- name: Run the benchmark
continue-on-error: true
run: |
cd benchmarker
docker build -t private-isu-benchmarker .
docker run --network host --add-host host.docker.internal:host-gateway -i private-isu-benchmarker /opt/go/bin/benchmarker -t http://host.docker.internal -u /opt/go/userdata
- name: Show logs
Expand Down

0 comments on commit a95e19d

Please sign in to comment.