83 lines
1.5 KiB
Markdown
83 lines
1.5 KiB
Markdown
|
|
# Build and Verification
|
||
|
|
|
||
|
|
## Prerequisites
|
||
|
|
|
||
|
|
- Node.js `>= 18`
|
||
|
|
- npm `>= 9` (workspace support)
|
||
|
|
|
||
|
|
## Install
|
||
|
|
|
||
|
|
```bash
|
||
|
|
npm ci
|
||
|
|
```
|
||
|
|
|
||
|
|
## Build All Packages
|
||
|
|
|
||
|
|
```bash
|
||
|
|
npm run build
|
||
|
|
```
|
||
|
|
|
||
|
|
Root build executes workspaces in dependency order. All 14 packages compile cleanly.
|
||
|
|
|
||
|
|
## Type Check
|
||
|
|
|
||
|
|
```bash
|
||
|
|
npm run typecheck
|
||
|
|
```
|
||
|
|
|
||
|
|
## Unit/Integration Test Sweep
|
||
|
|
|
||
|
|
```bash
|
||
|
|
npm test --workspaces
|
||
|
|
```
|
||
|
|
|
||
|
|
Runs all tests across all workspaces. Current status: **959 unit tests passing, 0 failures**.
|
||
|
|
|
||
|
|
## E2E (Playwright)
|
||
|
|
|
||
|
|
```bash
|
||
|
|
npx playwright test --config packages/imhotep-fixtures/playwright.config.ts
|
||
|
|
```
|
||
|
|
|
||
|
|
Playwright config lives at `packages/imhotep-fixtures/playwright.config.ts` and targets `packages/imhotep-fixtures/src/e2e*.test.ts`.
|
||
|
|
|
||
|
|
Current status: **215 E2E tests passing, 0 failures**.
|
||
|
|
|
||
|
|
## External Smoke Test
|
||
|
|
|
||
|
|
```bash
|
||
|
|
npm run test:external-smoke
|
||
|
|
```
|
||
|
|
|
||
|
|
Creates a clean temp directory, installs packages from local paths, and runs a full integration smoke test. Verifies that the published package structure works correctly.
|
||
|
|
|
||
|
|
## Common Targeted Runs
|
||
|
|
|
||
|
|
```bash
|
||
|
|
# Run tests for a specific package
|
||
|
|
npm test -w packages/imhotep-playwright
|
||
|
|
npm test -w packages/imhotep-fixtures
|
||
|
|
|
||
|
|
# Run specific E2E test file
|
||
|
|
npx playwright test packages/imhotep-fixtures/src/e2e-public.test.ts
|
||
|
|
```
|
||
|
|
|
||
|
|
## Clean
|
||
|
|
|
||
|
|
```bash
|
||
|
|
npm run clean
|
||
|
|
```
|
||
|
|
|
||
|
|
## Packaging Smoke
|
||
|
|
|
||
|
|
Use this before publishing a package:
|
||
|
|
|
||
|
|
```bash
|
||
|
|
npm pack --json
|
||
|
|
```
|
||
|
|
|
||
|
|
Check packed `package/package.json` for:
|
||
|
|
|
||
|
|
- no `workspace:*` protocol dependencies
|
||
|
|
- correct `main`, `types`, and `exports`
|