Pular para conteúdo

Sensors Computacionais

Checks determinísticos executados em milissegundos. Sem inferência de IA.

Por projeto

atenvi-ui, atenvi-web, atenvi-web-admin (Next.js/TypeScript)

Sensor Ferramenta Quando
Type check tsc --noEmit pre-commit + CI
Lint ESLint + eslint-config-next pre-commit + CI
Format Prettier + prettier-plugin-tailwindcss (ADR-0014) pre-commit (auto-fix) + CI (--check)
Unit/Integration Vitest CI (PR)
Coverage vitest --coverage (v8), 60–70% conforme projeto — CI quebra abaixo do threshold, ver ADR-0012 CI (PR)
E2E Playwright CI (merge main)
Build check next build CI (PR)

Implementado: atenvi-web (2026-07-07) — CI em .github/workflows/ci.yml (job verify), husky + lint-staged + commitlint. Branch protection da main pendente: repo privado no plano Free não libera protection nem rulesets (exige GitHub Team ou repo público). Até resolver, o "sem push direto / CI verde pra mergear" é convenção, não enforcement server-side. Demais projetos: pendente.

atenvi-bff (NestJS/TypeScript)

Sensor Ferramenta Quando
Type check tsc --noEmit pre-commit + CI
Lint ESLint + @typescript-eslint pre-commit + CI
Format Prettier pre-commit (auto-fix)
Unit/Integration Vitest CI (PR)
Coverage vitest --coverage (v8), 70% geral / 90% em módulos financeiros — CI quebra abaixo do threshold, ver ADR-0012 CI (PR)
Build check nest build CI (PR)

atenvi-ui (adicional)

Sensor Ferramenta Quando
Storybook build storybook build CI (PR)
Interaction tests @storybook/test CI (PR)

atenvi-app (React Native/Expo)

Sensor Ferramenta Quando
Type check tsc --noEmit pre-commit + CI
Lint ESLint + eslint-config-expo pre-commit + CI
Format Prettier pre-commit (auto-fix)
Unit Jest (jest-expo) CI (PR) — sem e2e no MVP
Coverage jest --coverage, 60% — CI quebra abaixo do threshold, ver ADR-0012 CI (PR)
Build eas build CI (merge main)

Pre-commit hook

Usar husky + lint-staged em todos os projetos:

{
  "lint-staged": {
    "*.{ts,tsx}": ["eslint --fix", "prettier --write"],
    "*.{json,md,css}": ["prettier --write"]
  }
}

CI — GitHub Actions (pipeline mínimo)

on: pull_request
jobs:
  check:
    steps:
      - typecheck
      - lint
      - test (vitest --coverage; quebra abaixo do threshold do ADR-0012)
      - build

on: push (main)
jobs:
  e2e:
    steps:
      - playwright