Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/live-release-smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Live Release Smoke

on:
workflow_run:
workflows: ["Build and Deploy to GitHub Pages"]
types: [completed]

permissions:
contents: read

concurrency:
group: live-release-smoke
cancel-in-progress: true

jobs:
verify-live:
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }}
runs-on: ubuntu-latest
steps:
- name: Checkout deployed commit
uses: actions/checkout@v7
with:
ref: ${{ github.event.workflow_run.head_sha }}

- name: Setup Node
uses: actions/setup-node@v7
with:
node-version: 24
cache: npm

- name: Install dependencies
run: npm ci

- name: Install Chromium
run: npx playwright install --with-deps chromium

- name: Verify deployed release
env:
PLAYWRIGHT_BASE_URL: https://hustlenix.github.io/LevelUp
run: node verify-release.mjs
41 changes: 40 additions & 1 deletion verify-release.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,47 @@ try {
await page.setViewportSize({ width, height: 900 });
assert.equal(await page.evaluate(() => document.documentElement.scrollWidth > innerWidth + 1), false, `practice library width ${width}`);
}
console.log("13-plan library and responsive widths verified.");

await page.setViewportSize({ width: 375, height: 900 });
await page.goto(`${base}/today/`, { waitUntil: "networkidle" });
const companionHome = page.getByRole("button", { name: /Open Milo companion space/ });
await companionHome.waitFor();
await companionHome.click();
await page.locator('section[aria-label="Milo companion space"]').waitFor();
await page.getByRole("button", { name: "Experience reviewer demo", exact: true }).click();

for (const [button, expectedEvent] of [
["Start focus", "FOCUS_STARTED"],
["Complete focus", "FOCUS_COMPLETED"],
["Open health chapter", "CHAPTER_STARTED"],
["Complete chapter", "CHAPTER_COMPLETED"],
["Reach milestone", "ROADMAP_MILESTONE"],
]) {
await page.getByRole("button", { name: button, exact: true }).click();
await page.getByText(expectedEvent, { exact: true }).first().waitFor();
}

await page.getByRole("button", { name: "room", exact: true }).click();
await page.locator(".room-lamp").waitFor();
await page.locator(".room-book").waitFor();
await page.locator(".room-trophy").waitFor();

await page.getByRole("button", { name: "settings", exact: true }).click();
const motionFieldset = page.getByRole("group", { name: "Motion" });
await motionFieldset.getByRole("button", { name: "off", exact: true }).click();
await page.locator('aside[aria-label="Level Up companion"][data-motion="off"]').waitFor();

await page.setViewportSize({ width: 320, height: 900 });
assert.equal(
await page.evaluate(() => document.documentElement.scrollWidth > innerWidth + 1),
false,
"expanded companion remains inside a 320px viewport"
);
console.log("Companion visibility, deterministic demo, unlocks, motion-off and 320px layout verified.");

assert.deepEqual(errors, [], "no runtime or required-resource HTTP errors");
console.log("PASS: 13-plan library, responsive widths, runtime and required resources.");
console.log("PASS: release routes, persistence, operating loop, backup, companion and responsive runtime.");
} finally {
await browser.close();
}
Loading