From a381aabf938f510a9c2e655acc79766d1f7813e2 Mon Sep 17 00:00:00 2001 From: Anatoly Belikov Date: Tue, 12 Nov 2024 16:14:09 +0300 Subject: [PATCH] start server for tests --- .github/workflows/test.yml | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3c9dff0..462947f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,35 +1,37 @@ -# Automatically build the project and run any configured tests for every push -# and submitted pull request. This can help catch issues that only occur on -# certain platforms or Java versions, and provides a first line of defence -# against bad commits. - +--- name: build and test -on: [pull_request, push] +on: + - pull_request + - push defaults: run: shell: bash -l {0} - jobs: build: name: build runs-on: self-hosted strategy: matrix: - # Use these Java versions - java: [ 21, ] # Current Java LTS & minimum supported by Minecraft + java: + - 21 steps: - name: lock file run: lockfile /tmp/minecraft-test-lock - name: checkout vereya uses: actions/checkout@v3 with: - repository: trueagi-io/Vereya + repository: noSkill/Vereya path: Vereya + ref: server clean: false - name: install vereya - run: rm /home/tester/.minecraft/mods/* ; ls && cd $GITHUB_WORKSPACE/Vereya/ && ./gradlew build && cp $GITHUB_WORKSPACE/Vereya/build/libs/* /home/tester/.minecraft/mods/ + run: rm /home/tester/.minecraft/mods/* ; ls && cd $GITHUB_WORKSPACE/Vereya/ && + ./gradlew build && cp $GITHUB_WORKSPACE/Vereya/build/libs/* /home/tester/.minecraft/mods/ && + mkdir $GITHUB_WORKSPACE/Vereya/server/mods/ ; + cp $GITHUB_WORKSPACE/Vereya/build/libs/* $GITHUB_WORKSPACE/Vereya/server/mods/ - name: install fabric - run: rsync -v $GITHUB_WORKSPACE/Vereya/fabric/* /home/tester/.minecraft/mods/ + run: rsync -v $GITHUB_WORKSPACE/Vereya/fabric/* /home/tester/.minecraft/mods/ && + cp $GITHUB_WORKSPACE/Vereya/fabric/* $GITHUB_WORKSPACE/Vereya/server/mods/ - name: checkout tagilmo uses: actions/checkout@v3 with: @@ -42,12 +44,15 @@ jobs: env: DISPLAY: :99 GITHUB_WORKSPACE: $GITHUB_WORKSPACE + - name: start minecraft server + run: cd Vereya/server && ./launch.sh & + env: + GITHUB_WORKSPACE: $GITHUB_WORKSPACE - name: run test run: | ps a|grep [j]ava && conda activate py31 && cd $GITHUB_WORKSPACE/tests/vereya && python run_tests.py - - name: save java logs if: always() uses: actions/upload-artifact@v3