diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 96bc88cd..8e5dccb7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -18,6 +18,21 @@ permissions: contents: read jobs: + profile-deno: + runs-on: ubuntu-latest + + steps: + - name: setup repo + uses: actions/checkout@v3 + + - name: setup Deno + uses: denoland/setup-deno@v1 + with: + deno-version: v1.x + + - name: Run profile + run: deno task profile + unit-test-deno: runs-on: ubuntu-latest @@ -39,9 +54,6 @@ jobs: - name: run tests run: deno task test - # - name: Run profile - # run: deno task profile - test-run-bun: runs-on: ubuntu-latest @@ -58,7 +70,9 @@ jobs: run: bun install - name: bun run - run: npm run test:bun && kill -9 <(lsof -i :7777 -t) + run: npm run test:bun + after_script: + - pkill bun test-run-wrangler: runs-on: ubuntu-latest @@ -74,4 +88,6 @@ jobs: run: npm install -g wrangler - name: wrangler dev - run: npm run test:cfw && kill -9 <(lsof -i :7777 -t) + run: npm run test:cfw + after_script: + - pkill node diff --git a/examples/auth/app.ts b/example/auth/app.ts similarity index 100% rename from examples/auth/app.ts rename to example/auth/app.ts diff --git a/examples/preact/assets/favicon.png b/example/preactSSR/assets/favicon.png similarity index 100% rename from examples/preact/assets/favicon.png rename to example/preactSSR/assets/favicon.png diff --git a/examples/preact/assets/lighthouse-score.png b/example/preactSSR/assets/lighthouse-score.png similarity index 100% rename from examples/preact/assets/lighthouse-score.png rename to example/preactSSR/assets/lighthouse-score.png diff --git a/examples/preact/assets/logo_dark_alpha.png b/example/preactSSR/assets/logo_dark_alpha.png similarity index 100% rename from examples/preact/assets/logo_dark_alpha.png rename to example/preactSSR/assets/logo_dark_alpha.png diff --git a/examples/preact/assets/logo_dark_alpha.webp b/example/preactSSR/assets/logo_dark_alpha.webp similarity index 100% rename from examples/preact/assets/logo_dark_alpha.webp rename to example/preactSSR/assets/logo_dark_alpha.webp diff --git a/examples/preact/assets/logo_dark_bg.png b/example/preactSSR/assets/logo_dark_bg.png similarity index 100% rename from examples/preact/assets/logo_dark_bg.png rename to example/preactSSR/assets/logo_dark_bg.png diff --git a/examples/preact/assets/logo_dark_bg.webp b/example/preactSSR/assets/logo_dark_bg.webp similarity index 100% rename from examples/preact/assets/logo_dark_bg.webp rename to example/preactSSR/assets/logo_dark_bg.webp diff --git a/examples/preact/assets/logo_light_alpha.png b/example/preactSSR/assets/logo_light_alpha.png similarity index 100% rename from examples/preact/assets/logo_light_alpha.png rename to example/preactSSR/assets/logo_light_alpha.png diff --git a/examples/preact/assets/logo_light_bg.png b/example/preactSSR/assets/logo_light_bg.png similarity index 100% rename from examples/preact/assets/logo_light_bg.png rename to example/preactSSR/assets/logo_light_bg.png diff --git a/examples/preact/assets/twemoji_chick.svg b/example/preactSSR/assets/twemoji_chick.svg similarity index 100% rename from examples/preact/assets/twemoji_chick.svg rename to example/preactSSR/assets/twemoji_chick.svg diff --git a/examples/preact/document.ts b/example/preactSSR/document.ts similarity index 55% rename from examples/preact/document.ts rename to example/preactSSR/document.ts index 19336f6c..3ef50783 100644 --- a/examples/preact/document.ts +++ b/example/preactSSR/document.ts @@ -1,4 +1,9 @@ -export default (tags: Record) => ` +export default (input: { + title: string; + entrypoint: string; + ssrHTML: string; + serverState?: Record; +}) => ` @@ -6,10 +11,13 @@ export default (tags: Record) => ` - ${tags && tags.title} - + ${input.title} + + - ${tags && tags.modulepreload} +