Tighten CI: coverage ratchet at 8% and ignore build artifacts
- package.json: test:coverage adds --check-coverage --lines=8 (current baseline is 8.32%; floor only goes up) - biome.json: ignore *.main.js webpack chunks, coverage/, node_modules/ - docs/CONTRIBUTING.md: document ratchet policy and long-term 70% target
This commit is contained in:
parent
af79356e58
commit
46f86c0091
@ -4,7 +4,7 @@
|
||||
"enabled": true
|
||||
},
|
||||
"files": {
|
||||
"ignore": ["main.js"]
|
||||
"ignore": ["main.js", "*.main.js", "coverage/**", "node_modules/**"]
|
||||
},
|
||||
"formatter": {
|
||||
"enabled": true,
|
||||
|
||||
@ -52,5 +52,16 @@ Citar o PR upstream na mensagem de commit (`baseado no PR upstream #<N>`).
|
||||
## Testes
|
||||
|
||||
- Toda feature ou bugfix inclui teste
|
||||
- Cobertura mínima do core: a definir (atualmente sem threshold)
|
||||
- Localização: `tests/` para src/, `pro/tests/` para pro/
|
||||
- Comando: `npm run test:coverage`
|
||||
|
||||
### Política de cobertura (ratchet)
|
||||
|
||||
Cobertura mínima de linhas é um **piso que só sobe**. Atualmente em `8%`
|
||||
(via `c8 --check-coverage --lines=8` no script `test:coverage`).
|
||||
|
||||
Quando você adicionar testes que elevam a cobertura geral, **suba o piso**
|
||||
no script `test:coverage` para o novo valor (truncado). Nunca abaixar.
|
||||
|
||||
Meta de longo prazo: 70% (padrão code-standards). Áreas zero-cobertura
|
||||
prioritárias: `src/main.ts`, `src/settings.ts`, backends `fs*.ts`.
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
"format": "npx @biomejs/biome check --write .",
|
||||
"clean": "npx rimraf main.js",
|
||||
"test": "mocha --import=tsx 'tests/**/*.ts' 'pro/tests/**/*.ts'",
|
||||
"test:coverage": "c8 --reporter=text --reporter=lcov --reporter=html npm test"
|
||||
"test:coverage": "c8 --check-coverage --lines=8 --reporter=text --reporter=lcov --reporter=html npm test"
|
||||
},
|
||||
"browser": {
|
||||
"path": "path-browserify",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user