Skip to content

Commit

Permalink
start server for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
noskill committed Nov 12, 2024
1 parent 9377c8d commit 95faf6c
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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: master
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:
Expand All @@ -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
Expand Down

0 comments on commit 95faf6c

Please sign in to comment.