forked from minetest-mods/3d_armor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add luacheck and integration test workflows / fix luacheck errors
partially attends to pandorabox-io/pandorabox.io#444 (the ObjectRef issue)
- Loading branch information
1 parent
f3ad7ec
commit f81cb10
Showing
10 changed files
with
152 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: integration-test | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: integration-test | ||
run: ./integration-test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: luacheck | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: apt | ||
run: sudo apt-get install -y luarocks | ||
- name: luacheck install | ||
run: luarocks install --local luacheck | ||
- name: luacheck run | ||
run: $HOME/.luarocks/bin/luacheck ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
unused_args = false | ||
|
||
globals = { | ||
"wieldview", | ||
"armor", | ||
"armor_i18n", | ||
"inventory_plus" | ||
} | ||
|
||
read_globals = { | ||
-- Stdlib | ||
string = {fields = {"split"}}, | ||
table = {fields = {"copy", "getn"}}, | ||
|
||
-- Minetest | ||
"vector", "ItemStack", | ||
"dump", "VoxelArea", | ||
|
||
-- deps | ||
"default", | ||
"minetest", | ||
"unified_inventory", | ||
"intllib", | ||
"wardrobe", | ||
"player_monoids", | ||
"armor_monoid", | ||
"sfinv", | ||
"ARMOR_MATERIALS", | ||
"ARMOR_FIRE_NODES", | ||
"pova", | ||
"skins", | ||
"u_skins" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
minetest.log("warning", "[TEST] integration-test enabled!") | ||
|
||
minetest.register_on_mods_loaded(function() | ||
minetest.after(1, function() | ||
|
||
local data = minetest.write_json({ success = true }, true); | ||
local file = io.open(minetest.get_worldpath().."/integration_test.json", "w" ); | ||
if file then | ||
file:write(data) | ||
file:close() | ||
end | ||
|
||
file = io.open(minetest.get_worldpath().."/registered_nodes.txt", "w" ); | ||
if file then | ||
for name in pairs(minetest.registered_nodes) do | ||
file:write(name .. '\n') | ||
end | ||
file:close() | ||
end | ||
|
||
minetest.log("warning", "[TEST] integration tests done!") | ||
minetest.request_shutdown("success") | ||
end) | ||
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
# simple integration test | ||
|
||
CFG=/tmp/minetest.conf | ||
MTDIR=/tmp/mt | ||
WORLDDIR=${MTDIR}/worlds/world | ||
|
||
cat <<EOF > ${CFG} | ||
enable_3d_armor_integration_test = true | ||
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/3d_armor \ | ||
registry.gitlab.com/minetest/minetest/server:5.0.1 | ||
|
||
test -f ${WORLDDIR}/integration_test.json && exit 0 || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters