Loading .gitlab-ci.yml +25 −0 Original line number Diff line number Diff line Loading @@ -82,8 +82,33 @@ lua-tests: - apk add --no-cache bash git lua5.4 lua5.4-dev luarocks build-base - | LUAROCKS_BIN="$(command -v luarocks-5.4 || command -v luarocks)" "$LUAROCKS_BIN" --lua-version=5.4 install random || true "$LUAROCKS_BIN" --lua-version=5.4 install luasocket "$LUAROCKS_BIN" --lua-version=5.4 install luasec "$LUAROCKS_BIN" --lua-version=5.4 install busted "$LUAROCKS_BIN" --lua-version=5.4 install luacov - | cat > /tmp/random.lua <<'EOF' local random = {} local function pseudo_uuid() local template = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx" return (template:gsub("[xy]", function(c) local v = math.random(0, 15) if c == "y" then v = (v % 4) + 8 end return string.format("%x", v) end)) end function random.uuid() return pseudo_uuid() end return random EOF export LUA_PATH="/tmp/?.lua;;" script: - echo "Running Lua test suite" - busted --output utfTerminal --pattern "_spec%.lua$" test Loading Loading
.gitlab-ci.yml +25 −0 Original line number Diff line number Diff line Loading @@ -82,8 +82,33 @@ lua-tests: - apk add --no-cache bash git lua5.4 lua5.4-dev luarocks build-base - | LUAROCKS_BIN="$(command -v luarocks-5.4 || command -v luarocks)" "$LUAROCKS_BIN" --lua-version=5.4 install random || true "$LUAROCKS_BIN" --lua-version=5.4 install luasocket "$LUAROCKS_BIN" --lua-version=5.4 install luasec "$LUAROCKS_BIN" --lua-version=5.4 install busted "$LUAROCKS_BIN" --lua-version=5.4 install luacov - | cat > /tmp/random.lua <<'EOF' local random = {} local function pseudo_uuid() local template = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx" return (template:gsub("[xy]", function(c) local v = math.random(0, 15) if c == "y" then v = (v % 4) + 8 end return string.format("%x", v) end)) end function random.uuid() return pseudo_uuid() end return random EOF export LUA_PATH="/tmp/?.lua;;" script: - echo "Running Lua test suite" - busted --output utfTerminal --pattern "_spec%.lua$" test Loading