From 36170d3311889106f45c957f1e5592ebc339fd95 Mon Sep 17 00:00:00 2001 From: sreenath-Chadive Date: Tue, 11 Nov 2025 09:24:34 +0000 Subject: [PATCH 1/9] chore: add playwright e2e test automation setup --- e2e/.github/workflows/playwright.yml | 38 +++++++++++++ e2e/.gitignore | 12 +++++ e2e/bun.lock | 63 ++++++++++++++++++++++ e2e/package.json | 19 +++++++ e2e/playwright.config.ts | 79 ++++++++++++++++++++++++++++ e2e/tests/example.spec.ts | 20 +++++++ 6 files changed, 231 insertions(+) create mode 100644 e2e/.github/workflows/playwright.yml create mode 100644 e2e/.gitignore create mode 100644 e2e/bun.lock create mode 100644 e2e/package.json create mode 100644 e2e/playwright.config.ts create mode 100644 e2e/tests/example.spec.ts diff --git a/e2e/.github/workflows/playwright.yml b/e2e/.github/workflows/playwright.yml new file mode 100644 index 0000000..640de4a --- /dev/null +++ b/e2e/.github/workflows/playwright.yml @@ -0,0 +1,38 @@ +name: Playwright E2E Tests + +on: + push: + branches: ["**"] + pull_request: + branches: ["**"] + +jobs: + test: + runs-on: ubuntu-latest + timeout-minutes: 60 + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + + - name: Install dependencies + run: bun install + + - name: Install Playwright browsers + run: bunx playwright install --with-deps + + - name: Run Playwright tests + run: bun run test:e2e + + - name: Upload Playwright report + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 diff --git a/e2e/.gitignore b/e2e/.gitignore new file mode 100644 index 0000000..38911d8 --- /dev/null +++ b/e2e/.gitignore @@ -0,0 +1,12 @@ +/test-results/ +/playwright-report/ +/blob-report/ +/playwright/.cache/ +/playwright/.auth/ +/playwright/.temp/ +/playwright/screenshots/ +/playwright/videos/ +/playwright-traces/ +/playwright-debug.log +node_modules/ +.cache/ diff --git a/e2e/bun.lock b/e2e/bun.lock new file mode 100644 index 0000000..8bffdc3 --- /dev/null +++ b/e2e/bun.lock @@ -0,0 +1,63 @@ +{ + "lockfileVersion": 1, + "configVersion": 1, + "workspaces": { + "": { + "name": "e2e", + "devDependencies": { + "@playwright/test": "^1.56.1", + "@types/node": "^24.10.0", + }, + }, + }, + "packages": { + "@playwright/test": [ + "@playwright/test@1.56.1", + "", + { + "dependencies": { "playwright": "1.56.1" }, + "bin": { "playwright": "cli.js" }, + }, + "sha512-vSMYtL/zOcFpvJCW71Q/OEGQb7KYBPAdKh35WNSkaZA75JlAO8ED8UN6GUNTm3drWomcbcqRPFqQbLae8yBTdg==", + ], + + "@types/node": [ + "@types/node@24.10.0", + "", + { "dependencies": { "undici-types": "~7.16.0" } }, + "sha512-qzQZRBqkFsYyaSWXuEHc2WR9c0a0CXwiE5FWUvn7ZM+vdy1uZLfCunD38UzhuB7YN/J11ndbDBcTmOdxJo9Q7A==", + ], + + "fsevents": [ + "fsevents@2.3.2", + "", + { "os": "darwin" }, + "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + ], + + "playwright": [ + "playwright@1.56.1", + "", + { + "dependencies": { "playwright-core": "1.56.1" }, + "optionalDependencies": { "fsevents": "2.3.2" }, + "bin": { "playwright": "cli.js" }, + }, + "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==", + ], + + "playwright-core": [ + "playwright-core@1.56.1", + "", + { "bin": { "playwright-core": "cli.js" } }, + "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==", + ], + + "undici-types": [ + "undici-types@7.16.0", + "", + {}, + "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + ], + }, +} diff --git a/e2e/package.json b/e2e/package.json new file mode 100644 index 0000000..5ec4487 --- /dev/null +++ b/e2e/package.json @@ -0,0 +1,19 @@ +{ + "name": "e2e", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "test:e2e": "playwright test", + "test:e2e:ui": "playwright test --ui", + "test:e2e:headed": "playwright test --headed", + "test:e2e:debug": "playwright test --debug" + }, + "keywords": [], + "author": "", + "license": "ISC", + "description": "", + "devDependencies": { + "@playwright/test": "^1.56.1", + "@types/node": "^24.10.0" + } +} diff --git a/e2e/playwright.config.ts b/e2e/playwright.config.ts new file mode 100644 index 0000000..509eda2 --- /dev/null +++ b/e2e/playwright.config.ts @@ -0,0 +1,79 @@ +import { defineConfig, devices } from "@playwright/test"; + +/** + * See https://playwright.dev/docs/test-configuration. + */ +export default defineConfig({ + testDir: "./tests", + /* Run tests in files in parallel */ + fullyParallel: true, + /* Fail the build on CI if you accidentally left test.only in the source code. */ + forbidOnly: !!process.env.CI, + /* Retry on CI only */ + retries: process.env.CI ? 2 : 0, + /* Opt out of parallel tests on CI. */ + workers: process.env.CI ? 1 : undefined, + /* Reporter to use. See https://playwright.dev/docs/test-reporters */ + reporter: "html", + /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ + use: { + /* Base URL to use in actions like `await page.goto('')`. */ + baseURL: "http://localhost:5173", + + // Record trace only when retrying a test for the first time. + trace: "on-first-retry", + + // Capture screenshot after each test failure. + screenshot: "only-on-failure", + + // Record video only when retrying a test for the first time. + video: "on-first-retry", + }, + + /* Configure projects for major browsers */ + projects: [ + { + name: "chromium", + use: { ...devices["Desktop Chrome"] }, + }, + + { + name: "firefox", + use: { ...devices["Desktop Firefox"] }, + }, + + { + name: "webkit", + use: { ...devices["Desktop Safari"] }, + }, + + /* Test against mobile viewports. */ + { + name: "Mobile Chrome", + use: { ...devices["Pixel 5"] }, + }, + + // { + // name: "Mobile Safari", + // use: { ...devices["iPhone 12"] }, + // }, + + /* Test against branded browsers. */ + // { + // name: 'Microsoft Edge', + // use: { ...devices['Desktop Edge'], channel: 'msedge' }, + // }, + // { + // name: 'Google Chrome', + // use: { ...devices['Desktop Chrome'], channel: 'chrome' }, + // }, + ], + + /* Run your local dev server before starting the tests */ + webServer: { + command: "npm run dev", + url: "http://localhost:5173", + reuseExistingServer: !process.env.CI, + timeout: 120 * 1000, + }, +}); diff --git a/e2e/tests/example.spec.ts b/e2e/tests/example.spec.ts new file mode 100644 index 0000000..ad26e05 --- /dev/null +++ b/e2e/tests/example.spec.ts @@ -0,0 +1,20 @@ +import { expect, test } from "@playwright/test"; + +test("has title", async ({ page }) => { + await page.goto("https://playwright.dev/"); + + // Expect a title "to contain" a substring. + await expect(page).toHaveTitle(/Playwright/); +}); + +test("get started link", async ({ page }) => { + await page.goto("https://playwright.dev/"); + + // Click the get started link. + await page.getByRole("link", { name: "Get started" }).click(); + + // Expects page to have a heading with the name of Installation. + await expect( + page.getByRole("heading", { name: "Installation" }), + ).toBeVisible(); +}); From 752ed5519d5664ce937d91c1d9432acccef3ecb5 Mon Sep 17 00:00:00 2001 From: sreenath-Chadive Date: Tue, 11 Nov 2025 09:35:43 +0000 Subject: [PATCH 2/9] ci: add playwright e2e workflow for pr and push --- .github/workflows/playwright.yml | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/playwright.yml diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml new file mode 100644 index 0000000..640de4a --- /dev/null +++ b/.github/workflows/playwright.yml @@ -0,0 +1,38 @@ +name: Playwright E2E Tests + +on: + push: + branches: ["**"] + pull_request: + branches: ["**"] + +jobs: + test: + runs-on: ubuntu-latest + timeout-minutes: 60 + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + + - name: Install dependencies + run: bun install + + - name: Install Playwright browsers + run: bunx playwright install --with-deps + + - name: Run Playwright tests + run: bun run test:e2e + + - name: Upload Playwright report + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 From 30fd062f090eb7c0fe879d765366801c51742b91 Mon Sep 17 00:00:00 2001 From: sreenath-Chadive Date: Tue, 11 Nov 2025 10:10:52 +0000 Subject: [PATCH 3/9] chore: add e2e playwright test setup --- .gitignore | 14 +++++ bun.lock | 10 +++ e2e/.github/workflows/playwright.yml | 38 ----------- e2e/.gitignore | 12 ---- e2e/bun.lock | 63 ------------------- e2e/package.json | 19 ------ package.json | 7 ++- ...aywright.config.ts => playwright.config.ts | 0 {e2e/tests => tests/e2e}/example.spec.ts | 0 9 files changed, 30 insertions(+), 133 deletions(-) delete mode 100644 e2e/.github/workflows/playwright.yml delete mode 100644 e2e/.gitignore delete mode 100644 e2e/bun.lock delete mode 100644 e2e/package.json rename e2e/playwright.config.ts => playwright.config.ts (100%) rename {e2e/tests => tests/e2e}/example.spec.ts (100%) diff --git a/.gitignore b/.gitignore index 63b1000..21f18ca 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,17 @@ .env.prod prisma/*.db + +# Playwright +/test-results/ +/playwright-report/ +/blob-report/ +/playwright/.cache/ +/playwright/.auth/ +/playwright/.temp/ +/playwright/screenshots/ +/playwright/videos/ +/playwright-traces/ +/playwright-debug.log +node_modules/ +.cache/ \ No newline at end of file diff --git a/bun.lock b/bun.lock index de03c3f..85072c6 100644 --- a/bun.lock +++ b/bun.lock @@ -1,5 +1,6 @@ { "lockfileVersion": 1, + "configVersion": 0, "workspaces": { "": { "name": "seo-ai-experiments", @@ -49,6 +50,7 @@ }, "devDependencies": { "@eslint/js": "^9.26.0", + "@playwright/test": "^1.56.1", "@react-router/dev": "^7.6.0", "@tailwindcss/typography": "^0.5.16", "@tailwindcss/vite": "^4.1.6", @@ -411,6 +413,8 @@ "@pkgjs/parseargs": ["@pkgjs/parseargs@0.11.0", "", {}, "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg=="], + "@playwright/test": ["@playwright/test@1.56.1", "", { "dependencies": { "playwright": "1.56.1" }, "bin": { "playwright": "cli.js" } }, "sha512-vSMYtL/zOcFpvJCW71Q/OEGQb7KYBPAdKh35WNSkaZA75JlAO8ED8UN6GUNTm3drWomcbcqRPFqQbLae8yBTdg=="], + "@prisma/client": ["@prisma/client@6.7.0", "", { "peerDependencies": { "prisma": "*", "typescript": ">=5.1.0" }, "optionalPeers": ["prisma", "typescript"] }, "sha512-+k61zZn1XHjbZul8q6TdQLpuI/cvyfil87zqK2zpreNIXyXtpUv3+H/oM69hcsFcZXaokHJIzPAt5Z8C8eK2QA=="], "@prisma/config": ["@prisma/config@6.7.0", "", { "dependencies": { "esbuild": ">=0.12 <1", "esbuild-register": "3.6.0" } }, "sha512-di8QDdvSz7DLUi3OOcCHSwxRNeW7jtGRUD2+Z3SdNE3A+pPiNT8WgUJoUyOwJmUr5t+JA2W15P78C/N+8RXrOA=="], @@ -1633,6 +1637,10 @@ "pkce-challenge": ["pkce-challenge@5.0.0", "", {}, "sha512-ueGLflrrnvwB3xuo/uGob5pd5FN7l0MsLf0Z87o/UQmRtwjvfylfc9MurIxRAWywCYTgrvpXBcqjV4OfCYGCIQ=="], + "playwright": ["playwright@1.56.1", "", { "dependencies": { "playwright-core": "1.56.1" }, "optionalDependencies": { "fsevents": "2.3.2" }, "bin": { "playwright": "cli.js" } }, "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw=="], + + "playwright-core": ["playwright-core@1.56.1", "", { "bin": { "playwright-core": "cli.js" } }, "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ=="], + "possible-typed-array-names": ["possible-typed-array-names@1.1.0", "", {}, "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg=="], "postcss": ["postcss@8.5.3", "", { "dependencies": { "nanoid": "^3.3.8", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A=="], @@ -2123,6 +2131,8 @@ "path-scurry/lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="], + "playwright/fsevents": ["fsevents@2.3.2", "", { "os": "darwin" }, "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA=="], + "react-d3-tree/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="], "react-router/cookie": ["cookie@1.0.2", "", {}, "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA=="], diff --git a/e2e/.github/workflows/playwright.yml b/e2e/.github/workflows/playwright.yml deleted file mode 100644 index 640de4a..0000000 --- a/e2e/.github/workflows/playwright.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Playwright E2E Tests - -on: - push: - branches: ["**"] - pull_request: - branches: ["**"] - -jobs: - test: - runs-on: ubuntu-latest - timeout-minutes: 60 - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup Bun - uses: oven-sh/setup-bun@v1 - with: - bun-version: latest - - - name: Install dependencies - run: bun install - - - name: Install Playwright browsers - run: bunx playwright install --with-deps - - - name: Run Playwright tests - run: bun run test:e2e - - - name: Upload Playwright report - if: ${{ !cancelled() }} - uses: actions/upload-artifact@v4 - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 diff --git a/e2e/.gitignore b/e2e/.gitignore deleted file mode 100644 index 38911d8..0000000 --- a/e2e/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -/test-results/ -/playwright-report/ -/blob-report/ -/playwright/.cache/ -/playwright/.auth/ -/playwright/.temp/ -/playwright/screenshots/ -/playwright/videos/ -/playwright-traces/ -/playwright-debug.log -node_modules/ -.cache/ diff --git a/e2e/bun.lock b/e2e/bun.lock deleted file mode 100644 index 8bffdc3..0000000 --- a/e2e/bun.lock +++ /dev/null @@ -1,63 +0,0 @@ -{ - "lockfileVersion": 1, - "configVersion": 1, - "workspaces": { - "": { - "name": "e2e", - "devDependencies": { - "@playwright/test": "^1.56.1", - "@types/node": "^24.10.0", - }, - }, - }, - "packages": { - "@playwright/test": [ - "@playwright/test@1.56.1", - "", - { - "dependencies": { "playwright": "1.56.1" }, - "bin": { "playwright": "cli.js" }, - }, - "sha512-vSMYtL/zOcFpvJCW71Q/OEGQb7KYBPAdKh35WNSkaZA75JlAO8ED8UN6GUNTm3drWomcbcqRPFqQbLae8yBTdg==", - ], - - "@types/node": [ - "@types/node@24.10.0", - "", - { "dependencies": { "undici-types": "~7.16.0" } }, - "sha512-qzQZRBqkFsYyaSWXuEHc2WR9c0a0CXwiE5FWUvn7ZM+vdy1uZLfCunD38UzhuB7YN/J11ndbDBcTmOdxJo9Q7A==", - ], - - "fsevents": [ - "fsevents@2.3.2", - "", - { "os": "darwin" }, - "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - ], - - "playwright": [ - "playwright@1.56.1", - "", - { - "dependencies": { "playwright-core": "1.56.1" }, - "optionalDependencies": { "fsevents": "2.3.2" }, - "bin": { "playwright": "cli.js" }, - }, - "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==", - ], - - "playwright-core": [ - "playwright-core@1.56.1", - "", - { "bin": { "playwright-core": "cli.js" } }, - "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==", - ], - - "undici-types": [ - "undici-types@7.16.0", - "", - {}, - "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", - ], - }, -} diff --git a/e2e/package.json b/e2e/package.json deleted file mode 100644 index 5ec4487..0000000 --- a/e2e/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "e2e", - "version": "1.0.0", - "main": "index.js", - "scripts": { - "test:e2e": "playwright test", - "test:e2e:ui": "playwright test --ui", - "test:e2e:headed": "playwright test --headed", - "test:e2e:debug": "playwright test --debug" - }, - "keywords": [], - "author": "", - "license": "ISC", - "description": "", - "devDependencies": { - "@playwright/test": "^1.56.1", - "@types/node": "^24.10.0" - } -} diff --git a/package.json b/package.json index 40365de..bad7cb5 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,11 @@ "format": "bunx --bun prettier . --ignore-path .gitignore --write --cache --cache-location ./node_modules/.cache/prettier", "typecheck": "bunx --bun react-router typegen && tsc", "fun": "bun format && bun typecheck && bun lint", - "cron": "bun run cron/index.ts" + "cron": "bun run cron/index.ts", + "test:e2e": "playwright test", + "test:e2e:ui": "playwright test --ui", + "test:e2e:headed": "playwright test --headed", + "test:e2e:debug": "playwright test --debug" }, "dependencies": { "@ai-sdk/anthropic": "^1.2.11", @@ -58,6 +62,7 @@ }, "devDependencies": { "@eslint/js": "^9.26.0", + "@playwright/test": "^1.56.1", "@react-router/dev": "^7.6.0", "@tailwindcss/typography": "^0.5.16", "@tailwindcss/vite": "^4.1.6", diff --git a/e2e/playwright.config.ts b/playwright.config.ts similarity index 100% rename from e2e/playwright.config.ts rename to playwright.config.ts diff --git a/e2e/tests/example.spec.ts b/tests/e2e/example.spec.ts similarity index 100% rename from e2e/tests/example.spec.ts rename to tests/e2e/example.spec.ts From 3139d4695d16b59ca82d6cd4e128e05b9f4bbe6e Mon Sep 17 00:00:00 2001 From: sreenath-Chadive Date: Tue, 11 Nov 2025 10:17:00 +0000 Subject: [PATCH 4/9] chore: add yml command to sync db --- .github/workflows/playwright.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 640de4a..56994a7 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -23,6 +23,9 @@ jobs: - name: Install dependencies run: bun install + - name: Sync database + run: bunx prisma db push + - name: Install Playwright browsers run: bunx playwright install --with-deps From d221c5c6453928babce21fc3f03e7474291b8fec Mon Sep 17 00:00:00 2001 From: sreenath-Chadive Date: Tue, 11 Nov 2025 10:24:12 +0000 Subject: [PATCH 5/9] chore: update yml config --- .github/workflows/playwright.yml | 13 +++++++++++++ playwright.config.ts | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 56994a7..68f096a 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -23,6 +23,10 @@ jobs: - name: Install dependencies run: bun install + - name: Setup environment variables + run: | + echo "DATABASE_URL=file:./prisma/test.db" >> $GITHUB_ENV + - name: Sync database run: bunx prisma db push @@ -39,3 +43,12 @@ jobs: name: playwright-report path: playwright-report/ retention-days: 30 + + - name: Upload test results + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: playwright-test-results + path: test-results/ + retention-days: 30 + if-no-files-found: ignore diff --git a/playwright.config.ts b/playwright.config.ts index 509eda2..cefea1f 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -71,7 +71,7 @@ export default defineConfig({ /* Run your local dev server before starting the tests */ webServer: { - command: "npm run dev", + command: "bun run dev", url: "http://localhost:5173", reuseExistingServer: !process.env.CI, timeout: 120 * 1000, From 4c17625a3e60bd6d543d87108c1144350246a784 Mon Sep 17 00:00:00 2001 From: sreenath-Chadive Date: Tue, 11 Nov 2025 10:29:20 +0000 Subject: [PATCH 6/9] chore: add yml config --- .github/workflows/playwright.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 68f096a..f49ff9f 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -10,6 +10,10 @@ jobs: test: runs-on: ubuntu-latest timeout-minutes: 60 + env: + CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }} + CLERK_PUBLISHABLE_KEY: ${{ secrets.CLERK_PUBLISHABLE_KEY }} + DATABASE_URL: file:./prisma/test.db steps: - name: Checkout repository @@ -23,10 +27,6 @@ jobs: - name: Install dependencies run: bun install - - name: Setup environment variables - run: | - echo "DATABASE_URL=file:./prisma/test.db" >> $GITHUB_ENV - - name: Sync database run: bunx prisma db push From e2db1ed3be611906415c7f1b2749f53ae5140fec Mon Sep 17 00:00:00 2001 From: sreenath-Chadive Date: Tue, 11 Nov 2025 10:40:13 +0000 Subject: [PATCH 7/9] chore: adadd clerk config in yml --- .github/workflows/playwright.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index f49ff9f..9a0f890 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -12,7 +12,7 @@ jobs: timeout-minutes: 60 env: CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }} - CLERK_PUBLISHABLE_KEY: ${{ secrets.CLERK_PUBLISHABLE_KEY }} + VITE_CLERK_PUBLISHABLE_KEY: ${{ secrets.CLERK_PUBLISHABLE_KEY }} DATABASE_URL: file:./prisma/test.db steps: From f3f334fe9d1dd963570601dfc75a6cb709fb4fec Mon Sep 17 00:00:00 2001 From: sreenath-Chadive Date: Tue, 11 Nov 2025 10:43:00 +0000 Subject: [PATCH 8/9] chore: update yml config --- .github/workflows/playwright.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 9a0f890..00d9970 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -12,6 +12,7 @@ jobs: timeout-minutes: 60 env: CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }} + CLERK_PUBLISHABLE_KEY: ${{ secrets.CLERK_PUBLISHABLE_KEY }} VITE_CLERK_PUBLISHABLE_KEY: ${{ secrets.CLERK_PUBLISHABLE_KEY }} DATABASE_URL: file:./prisma/test.db From b79470a2a5d4e1c23abea21acc4b63ed7d95969e Mon Sep 17 00:00:00 2001 From: sreenath-Chadive Date: Tue, 11 Nov 2025 10:49:58 +0000 Subject: [PATCH 9/9] chore: udpate playwright config --- playwright.config.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/playwright.config.ts b/playwright.config.ts index cefea1f..b1db3dd 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -71,7 +71,11 @@ export default defineConfig({ /* Run your local dev server before starting the tests */ webServer: { - command: "bun run dev", + command: `CLERK_PUBLISHABLE_KEY=${process.env.CLERK_PUBLISHABLE_KEY} \ + VITE_CLERK_PUBLISHABLE_KEY=${process.env.VITE_CLERK_PUBLISHABLE_KEY} \ + CLERK_SECRET_KEY=${process.env.CLERK_SECRET_KEY} \ + DATABASE_URL=${process.env.DATABASE_URL} \ + bun run dev`, url: "http://localhost:5173", reuseExistingServer: !process.env.CI, timeout: 120 * 1000,