added lua check CI step #49
+26
-1
@@ -105,7 +105,32 @@ jobs:
|
|||||||
return now, base, side
|
return now, base, side
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
./luals/bin/lua-language-server --check ./_luals_smoke_test.lua --checklevel=Warning --configpath ./.luarc.json
|
cat > ./src/_luals_smoke_test.lua << 'EOF'
|
||||||
|
local now = timer.getTime()
|
||||||
|
local base = Airbase.getByName("TEST")
|
||||||
|
local side = coalition.side.RED
|
||||||
|
return now, base, side
|
||||||
|
EOF
|
||||||
|
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
echo "=== smoke(root) ==="
|
||||||
|
./luals/bin/lua-language-server --check ./_luals_smoke_test.lua --checklevel=Warning --configpath ./.luarc.json 2>&1 | tee ./_luals_smoke_root.log
|
||||||
|
if grep -q "undefined-global" ./_luals_smoke_root.log; then
|
||||||
|
echo "Root smoke test reported undefined-global"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "=== smoke(src) ==="
|
||||||
|
./luals/bin/lua-language-server --check ./src/_luals_smoke_test.lua --checklevel=Warning --configpath ./.luarc.json 2>&1 | tee ./_luals_smoke_src.log
|
||||||
|
if grep -q "undefined-global" ./_luals_smoke_src.log; then
|
||||||
|
echo "Src smoke test reported undefined-global"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "=== check(failing-file) ==="
|
||||||
|
./luals/bin/lua-language-server --check ./src/classes/capClasses/CapAirbase.lua --checklevel=Warning --configpath ./.luarc.json 2>&1 | tee ./_luals_capairbase.log || true
|
||||||
|
grep -n "undefined-global" ./_luals_capairbase.log || true
|
||||||
|
|
||||||
- name: Run Lua Language Server
|
- name: Run Lua Language Server
|
||||||
run: ./luals/bin/lua-language-server --check ./src --checklevel=Warning --configpath ./.luarc.json
|
run: ./luals/bin/lua-language-server --check ./src --checklevel=Warning --configpath ./.luarc.json
|
||||||
|
|||||||
Reference in New Issue
Block a user