Skip to content

Development

dev1lsconf edited this page Nov 28, 2026 · 1 revision

Desarrollo

Build local

cargo build --release --locked
./target/release/tinytop --check-config --deep
./target/release/tinytop
./target/release/tinytop --tui

Calidad

cargo fmt --all -- --check
cargo clippy --all-targets --locked -- -D warnings
cargo test --all-targets --locked
cargo audit

E2E (Playwright)

npm ci
npx playwright install --with-deps chromium
BASE_URL=http://localhost:9090 npx playwright test

Las pruebas UI están en tests/ui.spec.ts. Si se cambia la UI/dashboard, hay que revisar y actualizar Playwright.

Hooks de Git

git config core.hooksPath scripts/git-hooks

El hook commit-msg:

  • recuerda revisar COMMITTING.md, AGENT.md, CONTRIBUTING.md, CHANGELOG.md y docs relevantes;
  • exige que el mensaje empiece con emoji según COMMITTING.md;
  • elimina trailers Co-authored-by:;
  • recuerda no embeber credenciales en URLs de remotes y usar git credential.helper.

Convención de commits

Formato: <emoji> tipo(scope opcional): descripción.

Ejemplos:

🐛 fix(api): corregir validación de target
📦 docs(readme): actualizar instalación
🔧 config: ajustar workflow de release

Guías del proyecto

  • Binario único, bajo consumo, sin dependencias externas obligatorias en runtime.
  • Integraciones opcionales best-effort.
  • No commitear secretos ni config local con datos personales.
  • Cambios de esquema/métricas SQLite: mantener paridad migración↔código↔API↔UI↔tests↔docs (ver AGENT.md).
  • Dashboard: alcance fijo de gráficos históricos (CPU, memoria, red RX/TX, load 1/5/15); no agregar otros sin aprobación explícita.

Releases

  • Release Please crea PR/tag/release al mergear en master.
  • Workflow Release publica artefactos, paquetes e imagen.
  • Fallback manual: Actions → Release → Run workflow con el tag.

Clone this wiki locally