From 2cbae3a084b2187bd0abe9fdd2438477bd6278d4 Mon Sep 17 00:00:00 2001 From: Anatoly Belikov Date: Tue, 24 Dec 2024 12:17:47 +0300 Subject: [PATCH] wait for minecraft sever to start in tests (#80) * wait for minecraft sever to start in tests * Update build.yml --- .github/workflows/build.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8d2a6b3..c357a29 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,9 +34,11 @@ jobs: - name: build run: ./gradlew build - name: install vereya - run: rm /home/tester/.minecraft/mods/* && cp $GITHUB_WORKSPACE/build/libs/* /home/tester/.minecraft/mods/ + run: rm /home/tester/.minecraft/mods/* && cp $GITHUB_WORKSPACE/build/libs/* /home/tester/.minecraft/mods/ && + rsync -v $GITHUB_WORKSPACE/build/libs/* $GITHUB_WORKSPACE/server/mods/ - name: install fabric - run: rsync -v $GITHUB_WORKSPACE/fabric/* /home/tester/.minecraft/mods/ + run: rsync -v $GITHUB_WORKSPACE/fabric/* /home/tester/.minecraft/mods/ && + rsync -v $GITHUB_WORKSPACE/fabric/* $GITHUB_WORKSPACE/server/mods/ - name: remove lock if: failure() run: rm -f /tmp/minecraft-test-lock @@ -56,6 +58,9 @@ jobs: path: minecraft-demo - name: install tagilmo run: conda activate py31 && cd $GITHUB_WORKSPACE/minecraft-demo && pip install . + - name: Check server health + run: | + timeout 60s bash -c "while ! curl -v -s http://localhost:25565/health 2>&1 | grep -q 'Empty reply'; do sleep 5s; done" - name: run test run: | ps a|grep [j]ava &&