Skip to content

ogadra/portfolio

Repository files navigation

ogadra.com portfolio

Astro SSR portfolio deployed to Cloudflare Workers.

Project Structure

/
├── messages/
├── public/
├── src/
├── tests/
│   ├── e2e/
│   └── typewriterTiming.test.ts
├── astro.config.mjs
├── playwright.config.ts
└── wrangler.jsonc

Commands

Run these from the project root:

Command Action
pnpm install Install dependencies
pnpm dev Start the Astro dev server at localhost:4321
pnpm build Build the Cloudflare Workers SSR output to ./dist/
pnpm preview Preview the built Worker locally with Wrangler
pnpm check Run Astro checks and vite-plus format/lint checks
pnpm test Run unit tests
pnpm test:e2e Preview the current build and run Playwright E2E tests
pnpm exec playwright install Install Playwright browsers outside the Nix dev shell
pnpm exec playwright install-deps Install OS packages needed by Playwright browsers
pnpm deploy Build and deploy with Wrangler

E2E

The E2E suite uses Playwright against the production-like Wrangler preview. The Playwright config starts pnpm preview automatically unless PLAYWRIGHT_BASE_URL is set. Run pnpm build before the first E2E run and after changes that affect the built output.

The Nix dev shell provides Chromium and configures Playwright to use it:

nix develop
pnpm build
pnpm test:e2e

Outside the Nix dev shell, install Playwright's browser bundle first:

pnpm exec playwright install chromium
pnpm build
pnpm test:e2e

If the downloaded Chromium cannot run in the local environment, point Playwright at an existing Chrome-compatible browser:

PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH="$(which google-chrome)" pnpm test:e2e

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors