mirror of
https://github.com/D00Med/scifi_nodes.git
synced 2024-11-10 20:20:35 +01:00
26 lines
680 B
Bash
Executable File
26 lines
680 B
Bash
Executable File
#!/bin/sh
|
|
# Spins up a test world to ensure proper working recipes and registrations
|
|
|
|
CWD=$(dirname $0)
|
|
cd ${CWD}/../
|
|
|
|
CFG=/tmp/minetest.conf
|
|
MTDIR=/tmp/mt
|
|
WORLDDIR=${MTDIR}/worlds/world
|
|
|
|
cat <<EOF > ${CFG}
|
|
# empty
|
|
EOF
|
|
|
|
mkdir -p ${WORLDDIR}
|
|
chmod 777 ${MTDIR} -R
|
|
docker run --rm -i \
|
|
-v ${CFG}:/etc/minetest/minetest.conf:ro \
|
|
-v ${MTDIR}:/var/lib/minetest/.minetest \
|
|
-v $(pwd)/:/var/lib/minetest/.minetest/worlds/world/worldmods/scifi_nodes \
|
|
-v $(pwd)/test/test_mod/:/var/lib/minetest/.minetest/worlds/world/worldmods/scifi_nodes_test \
|
|
--network host \
|
|
registry.gitlab.com/minetest/minetest/server:5.2.0
|
|
|
|
test -f ${WORLDDIR}/integration_test.json && exit 0 || exit 1
|