Fix tests

This commit is contained in:
marked 2025-04-12 20:08:38 +02:00
parent 00e62105fc
commit 7646bd93b5
2 changed files with 19 additions and 14 deletions

View file

@ -27,9 +27,14 @@ local function sync(to: string): result.Identity<boolean>
fs.writeDir(to) fs.writeDir(to)
end end
if not fs.metadata(`{to}/addons`).exists then
fs.writeDir(`{to}/addons`)
end
progress:nextStage() -- fetch progress:nextStage() -- fetch
local includes = { local includes = {
"addons/observers.luau",
"jecs.luau", "jecs.luau",
"README.md", "README.md",
"CHANGELOG.md", "CHANGELOG.md",

View file

@ -46,23 +46,23 @@ local function test(origin: string): result.Identity<boolean>
progress:nextStage() -- fetch progress:nextStage() -- fetch
do local includes = {
local contents = shared.fetch_raw("tools/testkit.luau") "tools/testkit.luau",
"tools/runtime_lints.luau",
"tools/lifetime_tracker.luau",
"tools/entity_visualiser.luau",
"test/tests.luau",
}
for _, file in includes do
local contents = shared.fetch_raw(file)
if not contents.ok then if not contents.ok then
progress:stop() progress:stop()
stdio.ewrite(`🔥 Couldn't get the latest source for tools/testkit.luau:\n{contents.err}\n`) stdio.ewrite(`🔥 Couldn't get the latest source for {file}:\n{contents.err}\n`)
return result(false, "Couldn't get the latest source for tools/testkit.luau.") return result(false, `Couldn't get the latest source for {file}.`)
end end
fs.writeFile(`{origin}/tools/testkit.luau`, contents.val)
end fs.writeFile(`{origin}/{file}`, contents.val)
do
local contents = shared.fetch_raw("test/tests.luau")
if not contents.ok then
progress:stop()
stdio.ewrite(`🔥 Couldn't get the latest source for test/tests.luau:\n{contents.err}\n`)
return result(false, "Couldn't get the latest source for test/tests.luau.")
end
fs.writeFile(`{origin}/test/tests.luau`, contents.val)
end end
progress:nextStage() -- test progress:nextStage() -- test