Repository navigation
feat(meticulous): integrate Meticulous session recorder and testing w… #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Meticulous session recorder — https://app.meticulous.ai/docs/recorder-installation | ||
| # Project ID: Meticulous Dashboard → Project Settings | ||
| NEXT_PUBLIC_METICULOUS_PROJECT_ID= | ||
|
|
||
| # GitHub Actions only (Repository Settings → Secrets → Actions) | ||
| # METICULOUS_API_TOKEN= |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # Meticulous visual regression tests — https://app.meticulous.ai/docs/github-actions-v2 | ||
| # Required secret: METICULOUS_API_TOKEN (Meticulous Dashboard → Project Settings) | ||
| name: Meticulous Tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: {} | ||
| workflow_dispatch: {} | ||
|
|
||
| permissions: | ||
| actions: write | ||
| contents: read | ||
| issues: write | ||
| pull-requests: write | ||
| statuses: read | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Build Next.js app | ||
| run: pnpm build | ||
| env: | ||
| NODE_ENV: production | ||
|
Comment on lines
+39
to
+42
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win Pass
Proposed fix jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30
+ env:
+ NEXT_PUBLIC_METICULOUS_PROJECT_ID: ${{ vars.NEXT_PUBLIC_METICULOUS_PROJECT_ID }}
steps:🤖 Prompt for AI Agents |
||
| METICULOUS_BUILD: 'true' | ||
|
|
||
| - name: Start app | ||
| run: | | ||
| pnpm start & | ||
| npx wait-on http://localhost:3009/en --timeout 60000 | ||
|
|
||
| - name: Run Meticulous tests | ||
| uses: alwaysmeticulous/report-diffs-action/cloud-compute@v1 | ||
| with: | ||
| api-token: ${{ secrets.METICULOUS_API_TOKEN }} | ||
| app-url: 'http://localhost:3009' | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /** Meticulous session recorder snippet URL. @see https://app.meticulous.ai/docs/recorder-installation */ | ||
| export const METICULOUS_RECORDER_SCRIPT_URL = | ||
| 'https://snippet.meticulous.ai/v1/meticulous.js' as const |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /** | ||
| * Returns the Meticulous project ID when `NEXT_PUBLIC_METICULOUS_PROJECT_ID` is set. | ||
| * Configure in `.env.local` for localhost session recording. | ||
| * | ||
| * @returns Project ID from the Meticulous dashboard, or undefined when not configured | ||
| */ | ||
| export function getMeticulousProjectId(): string | undefined { | ||
| const projectId = process.env.NEXT_PUBLIC_METICULOUS_PROJECT_ID?.trim() | ||
| return projectId ? projectId : undefined | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.