- This repo is primarily a single GitHub Action. The shipped entrypoints are
action.yml -> dist/index.jsanddist/post/index.js; source lives insrc/index.tsandsrc/post.ts. - Python files are not incidental scripts:
config.py,kernelsu/,lxc/,nethunter/, andrekernel/have their own lint and pytest coverage in CI.
- Install JS deps with
yarn install. CI uses Yarn, not npm/pnpm. - Rebuild the action with
yarn buildafter changingsrc/**/*.ts. This regenerates the committeddist/entrypoints used byaction.yml. - TypeScript checks:
yarn lint,yarn format:check,yarn test,yarn biome. - Python checks:
python3 -m pytest,mypy --explicit-package-bases kernelsu/ lxc/ nethunter/ rekernel/ config.py,pylint kernelsu/ lxc/ nethunter/ rekernel/ config.py. - Focused TS test:
yarn vitest run __tests__/builder.test.ts. - Focused Python test:
python3 -m pytest __pytest__/rekernel/test_patch.py. - Re:Kernel module build check:
make -j4 V=1inrekernel/.
- For
src/changes: runyarn buildfirst, then the smallest relevant subset ofyarn lint,yarn format:check,yarn test, andyarn biome. - For Python helper changes: run the smallest relevant
python3 -m pytesttarget first, thenmypyandpylintfor the touched Python paths. - For changes that affect both TS action flow and Python patch helpers, run both stacks.
- Do not treat
.github/workflows/build.ymlas action logic. It is an example usage workflow; PRs that modify it are auto-closed by.github/workflows/close-pr.yml. - The action is designed for GitHub Actions Linux runners only.
src/utils.tshard-fails unlessGITHUB_ACTIONS=true, platform is Linux, andaptorpacmanis available. - Local kernel sources are only recognized when
kernel-urlis.or a relative path ending with/; otherwise the action treats it as a remote clone target. extra-make-argsis parsed as a JSON array string, not a shell fragment.- Biome is lint-only here.
biome.jsondisables Biome formatting and import organization; formatting checks come from Prettier.
src/index.tsorchestrates the full build: validate inputs/environment, install system deps/toolchains, fetch kernel sources, apply feature patches, build, package, upload/release.src/post.tsis always-run cleanup/error analysis; if you change build failure behavior, check post-action state handling too.- Feature integrations call repo-local Python helpers from TS (
config.py,rekernel/patch.py,nethunter/patch.py,lxc/patch_cocci.py,kernelsu/apply_cocci.py), so cross-language regressions are easy to introduce.