coverage-runlisted
Install: claude install-skill parisgroup-ai/imersao-ia-setup
# coverage-run
Execute tests with coverage collection across multiple stacks.
## Commands
```bash
/coverage-run # Run all stacks
/coverage-run unit # Vitest only
/coverage-run e2e # Playwright only
/coverage-run python # pytest only
/coverage-run api # Vitest for packages/api only
/coverage-run web # Vitest for apps/web only
```
## Execution Flow
### 1. Read Configuration
```bash
cat coverage-config.json
```
Extract stack commands and report paths from the config.
### 2. Auto-Detect Stack
| Input | Stack | Command |
|-------|-------|---------|
| `unit`, `vitest` | Vitest | `pnpm test -- --coverage` (turbo passthrough) |
| `e2e`, `playwright` | Playwright | `pnpm -C apps/web test:e2e` |
| `python`, `pytest` | pytest | `cd apps/ana-service && pytest --cov` |
| `api`, `database`, etc | Vitest (scoped) | `pnpm test --filter="@repo/{name}" -- --coverage` |
| (none) | All | Run sequentially |
**Important:** Use `-- --coverage` to pass args through Turborepo to Vitest.
### 3. Pre-flight Checks
Before running tests:
```bash
# Check if DB is accessible (for integration tests)
docker ps | grep postgres || echo "Warning: PostgreSQL not running"
# Check if Python venv exists for pytest
test -d apps/ana-service/.venv || echo "Warning: Python venv not found"
```
### 4. Execute Coverage
**Vitest (all packages):**
```bash
# Use -- to pass args through Turborepo
pnpm test -- --coverage --coverage.reporter=json-summary --cov