$ErrorActionPreference = 'Stop' $projectRoot = Split-Path -Parent $PSScriptRoot function Assert-ExitCode { param([string]$Step) if ($LASTEXITCODE -ne 0) { throw "$Step failed with exit code $LASTEXITCODE" } } Push-Location $projectRoot try { pnpm --dir frontend lint Assert-ExitCode 'Frontend lint' pnpm --dir frontend typecheck Assert-ExitCode 'Frontend typecheck' pnpm --dir frontend test Assert-ExitCode 'Frontend tests' pnpm --dir frontend build Assert-ExitCode 'Frontend build' cargo fmt --manifest-path backend\Cargo.toml -- --check Assert-ExitCode 'Rust formatting' cargo clippy --manifest-path backend\Cargo.toml --all-targets -- -D warnings Assert-ExitCode 'Rust clippy' cargo test --manifest-path backend\Cargo.toml Assert-ExitCode 'Rust tests' powershell -NoProfile -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot 'e2e.ps1') Assert-ExitCode 'Playwright end-to-end tests' } finally { Pop-Location }