ci(core): add quality gates with lefthook hooks and GitHub Actions CI
Merged
MP
7mo ago+701+701+012345678901234567890123456789-20-20-01234567890123456789
Summary
- Lefthook pre-commit/pre-push hooks for local quality enforcement
- GitHub Actions CI pipeline with Rust checks, frontend checks, and cross-platform build matrix
- Contributor automation (auto-label, welcome messages, stale cleanup)
- Project configuration files (.editorconfig, CHANGELOG.md, labeler.yml)
- Updated CONTRIBUTING.md and PR template with complete instructions
Changes
Local quality gates (lefthook)
- Pre-commit (parallel):
cargo fmt --check,cargo clippy -D warnings,oxlint, secret file detection - Pre-push (parallel):
cargo test,vitest run,tsc -b
CI pipeline (.github/workflows/ci.yml)
- rust-checks: fmt, clippy, tests with coverage (cargo-llvm-cov, 80% threshold)
- frontend-checks: oxlint, tsc -b, vitest with coverage
- build: cross-platform matrix (Linux, macOS, Windows) with
fail-fast: false - Explicit
permissions: contents: readfor least-privilege
Contributor automation (.github/workflows/contributor.yml)
- Auto-labeling PRs by file path (labeler.yml)
- Welcome messages for first-time contributors
- Stale issue/PR cleanup (60 days)
Configuration
.editorconfigfor cross-editor consistencyCHANGELOG.md(Keep a Changelog format)- Updated
CONTRIBUTING.mdwith dev setup, testing, and linting instructions - Updated PR template with specific checklist (cargo test, npm test, CHANGELOG)
Test plan
-
lefthook installruns vianpm run prepare - Pre-commit hooks installed in
.git/hooks/ -
cargo fmt --checkpasses -
cargo clippy -- -D warningspasses -
oxlint .passes (0 errors) -
tsc -bpasses -
vitest runpasses - CI pipeline runs on this PR (GitHub Actions)
- Cross-platform build matrix completes
Summary by cubic
Adds local quality gates with lefthook and a GitHub Actions CI pipeline covering linting, tests, coverage, secret-file checks, and Rust dependency audits. Also upgrades src-tauri to Rust 2024, adds contributor automation and editor/docs configs, and fixes Rust CI on Linux by installing required system deps.
-
New Features
- Local
lefthookhooks: fmt, clippy,oxlint, secret-file check (broadened regex; ignores deleted files); pre-push runscargo test,vitest, andtsc -b. - CI: Rust fmt/clippy/tests with
cargo-llvm-cov(reports only) andcargo audit; Linux GTK/WebKit deps; frontendoxlint,tsc -b,vitestwith coverage; CI-side secret-file gate; cross-platform build matrix; least-privilege permissions. - Contributor automation: auto-label by paths, welcome messages, mark stale after 60 days.
- Config/docs:
.editorconfig,CHANGELOG.md, updatedCONTRIBUTING.mdand PR template.
- Local
-
Dependencies
- Add dev deps:
lefthook,@vitest/coverage-v8,@types/node. - Add scripts:
prepare(installlefthook),test:coverage,lint:fix,typecheck.
- Add dev deps:
Summary by CodeRabbit
-
Chores
- Added repository-wide editor settings, updated ignore rules, tooling scripts, git hooks, dependency scripts, and bumped Rust edition.
-
CI
- Introduced a CI pipeline with linting, tests, coverage gates, and a cross-platform build matrix.
- Added contributor automation for auto-labeling, welcome messages, and scheduled stale management.
-
Documentation
- Added a contributor guide, updated the PR checklist template, and initialized the changelog.