Repository navigation
Conversation
release.yml only fires on a v* tag, so nothing checks a change before it lands. Three open PRs have gone up with no automated signal on any of them. The suite needs nothing but a LuaJIT binary -- spec/all.lua sets package.path the way KOReader's pluginloader does, precisely so the modules can be exercised without KOReader -- and it finishes in under a second. It already exits non-zero on failure, so it needs no wrapper. Byte-compiling every plugin file alongside catches a syntax error in one the specs happen not to require, which on a plugin means KOReader silently refusing to load it at runtime. xargs rather than find -exec for that step: find reports its own exit status and not the command's, so an -exec form passes even when a file does not compile. Verified both ways -- clean tree exits 0, a deliberately broken file exits non-zero. Actions minutes are free for public repositories, so this costs the project nothing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
v4 targets Node 20, which GitHub deprecated; the runner forces it onto Node 24 and annotates every run with a warning. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
release.ymlonly fires on av*tag, so nothing checks a change before itlands — the three PRs currently open (#3, #4, #5) have no automated signal on
any of them. This adds a check that runs on push and pull request.
What it does
karako.koplugin/spec/all.luaNothing else is needed:
spec/all.luasetspackage.paththe way KOReader'spluginloader does — which is what makes the modules testable without KOReader in
the first place — and it already ends
os.exit(Runner.report() and 0 or 1), soit fails loudly without a wrapper. The whole job is a few seconds.
The byte-compile step is there for a syntax error in a file the specs happen not
to
require. In a plugin that does not surface as a failing test; it surfaces asKOReader quietly declining to load the plugin at runtime.
Two details worth the review time
xargs, notfind -exec.findreports its own exit status rather than thecommand's, so
find … -exec luajit -bl {} \;exits 0 even when a file does notcompile — a gate that always passes. I had exactly that in the first draft and
caught it by feeding in a deliberately broken file.
find -print0 | xargs -0 -n1propagates the failure.
One file per invocation.
luajit -btakes a single input, so batching with-exec … +makes it treat the second path as an output.Verified both ways: clean tree exits 0, a file with
this is not luaappendedexits non-zero, and an added failing assertion makes the spec step exit 1.
Cost
None. Actions minutes are free and unlimited for public repositories.
Note
Happy for this to be shaped differently — pinned action SHAs, a matrix over Lua
versions, restricting
pushtomain— or dropped entirely if you would rathernot have CI here. I opened it because I have three PRs in flight against this
repo and it seemed wrong to ask you to review them with nothing checking them.