mirror of
https://github.com/minetest/minetest_game.git
synced 2025-06-17 08:20:19 +02:00
Fix Docker CI test to run on new/old engine versions
This commit is contained in:
parent
9321c265b6
commit
05d5461a41
10
.github/workflows/test.yml
vendored
10
.github/workflows/test.yml
vendored
@ -1,11 +1,19 @@
|
||||
name: test
|
||||
name: Test
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
strategy:
|
||||
matrix:
|
||||
cfg:
|
||||
- { image: 'ghcr.io/minetest/minetest:5.9.0' }
|
||||
- { image: 'ghcr.io/minetest/minetest:5.10.0' }
|
||||
- { image: 'ghcr.io/luanti-org/luanti:master' } # latest git
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- run: ./utils/test/run.sh
|
||||
env:
|
||||
DOCKER_IMAGE: "${{ matrix.cfg.image }}"
|
||||
|
@ -3,6 +3,7 @@ world=$(mktemp -d)
|
||||
trap 'rm -rf "$world" || :' EXIT
|
||||
|
||||
[ -f game.conf ] || { echo "Must be run in game root folder." >&2; exit 1; }
|
||||
[ -n "$DOCKER_IMAGE" ] || { echo "Specify a docker image." >&2; exit 1; }
|
||||
|
||||
chmod -R 777 "$world" # container uses unprivileged user inside
|
||||
|
||||
@ -12,7 +13,6 @@ vol=(
|
||||
-v "$PWD":/var/lib/minetest/.minetest/games/minetest_game
|
||||
-v "$world":/var/lib/minetest/.minetest/world
|
||||
)
|
||||
[ -z "$DOCKER_IMAGE" ] && DOCKER_IMAGE="ghcr.io/minetest/minetest:master"
|
||||
docker run --rm -i "${vol[@]}" "$DOCKER_IMAGE" --config /etc/minetest/minetest.conf --gameid minetest
|
||||
|
||||
test -f "$world/map.sqlite" || exit 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user