en un clic
lean-ci
// Guide for writing and modifying GitHub Actions workflows in this repository. Use when creating CI/CD pipelines, adding workflow jobs, modifying build steps, or debugging CI failures. Enforces the project's lean CI philosophy.
// Guide for writing and modifying GitHub Actions workflows in this repository. Use when creating CI/CD pipelines, adding workflow jobs, modifying build steps, or debugging CI failures. Enforces the project's lean CI philosophy.
Guide for development practices in the Abbenay project. Covers decision logging, version management, build architecture, and package structure. Use when making architectural choices, adding features, or modifying the build system.
Hard gate for code quality before pushing or creating a pull request. MUST be followed before every push, every PR, and every PR update. No exceptions.
Guide for handling pull request reviews, including automated (Copilot) and human reviewer feedback. Use when responding to PR comments, resolving review threads, or updating PRs after review.
| name | lean-ci |
| description | Guide for writing and modifying GitHub Actions workflows in this repository. Use when creating CI/CD pipelines, adding workflow jobs, modifying build steps, or debugging CI failures. Enforces the project's lean CI philosophy. |
This project follows a strict "CI as thin wrapper" philosophy. GitHub Actions workflows must never contain substantive build logic. All logic lives in locally-runnable scripts; CI just calls them.
Every CI step must be reproducible locally. A developer should be able to run the exact same command on their laptop. If a step only works inside GitHub Actions, it violates this rule.
Workflows call npm scripts, not inline shell. Build logic belongs in
package.json scripts or build.js, never in YAML run: blocks beyond a
single command invocation.
bootstrap.sh is the only setup step. It downloads Node.js (with SEA
fuse), uv, and prek into .build-tools/. No actions/setup-node, no
actions/setup-python, no other setup actions. The bootstrap auto-detects
CI via $GITHUB_PATH and persists PATH entries for subsequent steps.
No version pinning in YAML. The Node.js version is in .node-version,
read by bootstrap.sh. Tool versions are managed in one place, not
scattered across workflow files.
| npm script | What it does | When to use in CI |
|---|---|---|
npm run lint | Lint all workspace packages | Quality gate |
npm test | Test all workspace packages | Quality gate |
npm run ci:build | Full build with --skip-proto (SEA + VSIX + tar.gz) | Build artifacts |
npm run ci:package-python | Build Python wheel via uvx hatch build | Python artifact |
The CI workflow (.github/workflows/ci.yml) has three jobs:
@abbenay/core smoke test on all runnersWhen adding or modifying CI:
package.json, then call
it from the workflow with npm run <script>../bootstrap.sh as the sole setup mechanism.actions/upload-artifact@v4.actions/setup-node, actions/setup-python, or similar
setup actions. The bootstrap handles all toolchain setup.run: blocks. If it needs more
than one command, it belongs in a script..node-version or package.json.Wrong (logic in YAML):
- name: Generate docs
run: |
npm install -g typedoc
npx typedoc --out docs/api packages/daemon/src/core/index.ts
tar czf docs-api.tar.gz docs/api
Right (logic in npm script):
"ci:docs": "typedoc --out docs/api packages/daemon/src/core/index.ts"
- name: Generate docs
run: npm run ci:docs
.github/workflows/release.yml triggers on v* tags. It injects the version
from the tag into all package.json files via scripts/set-version.js, builds
all platforms, then creates a GitHub Release with the artifacts attached. Tags
containing alpha, beta, or rc are automatically marked as prereleases.
Release assets: platform-specific .vsix files, .tar.gz daemon archives
(with version in filename), @abbenay/core npm tarball, and Python wheel.
To create a release:
git tag v0.0.1-alpha
git push --tags
bootstrap.sh downloads into .build-tools/ (gitignored):
.node-version) -- official
binaries always include the NODE_SEA_FUSE sentinel.pre-commit-config.yamlIt detects $GITHUB_PATH and appends tool paths automatically so subsequent
workflow steps inherit them without sourcing env.sh.
Linux build jobs MUST install libsecret-1-dev before npm ci. The keytar
native module uses prebuild-install to download a prebuilt binary, but this
can fail (network issues, rate limits), causing a fallback to source compilation
via node-gyp. Without libsecret-1-dev, the fallback fails and the build
breaks non-deterministically. Always install it as a safety net:
- name: Install system dependencies (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update -qq && sudo apt-get install -y -qq libsecret-1-dev
The lint-and-test job also installs xvfb for VS Code extension tests.
The lint-and-test job installs xvfb and runs tests via xvfb-run -a npm test
to provide a virtual display for the VS Code test runner. GPU acceleration is
disabled via ~/.vscode/argv.json. This is the one CI-only prerequisite that
cannot be reproduced identically on a local machine with a display server, but
the underlying npm test command is the same.