Skip to main content
Every change MUST pass both checks. CI runs them on every pull request.

1. LuaLS strict check

Zero problems, with the CfxLua natives available:
Never set workspace.library in .luarc.json. It replaces the natives library that the CfxLua VS Code extension adds. Ignore patterns MUST be anchored with a leading slash, such as /config/*.

2. Runtime tests

Plain Lua 5.4 scripts in tests/, one suite per feature. They mock natives (LoadResourceFile, GetConvar, GetGameTimer, KVP, GlobalState, statebags, json, vectors, oxmysql) and load files in manifest order.
A suite exits with code 1 on any failure.

Writing a test

tests/myfeature.lua
  • H.LoadManifest(side) loads shared scripts, then that side’s scripts.
  • Pass wrong-type arguments through H.Any(value), since LuaLS ignores --[[@as T]] on literals.
  • Test functional behavior only. Cosmetic output, such as the boot banner, is verified on a running server.

3. Repository check

CI also runs .github/scripts/check-repository.lua. It checks the manifest against the files in the repository and the license header of every Lua file.