diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index b48002dc..11e43b97 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -19,6 +19,8 @@ jobs: run: pnpm exec playwright test env: BASE_URL: ${{ github.event.deployment_status.environment_url }} + E2E_GITHUB_USER_EMAIL: ${{ secrets.E2E_GITHUB_USER_EMAIL }} + E2E_GITHUB_USER_PASSWORD: ${{ secrets.E2E_GITHUB_USER_PASSWORD }} - uses: actions/upload-artifact@v3 if: always() with: diff --git a/e2e/tests/auth.setup.ts b/e2e/tests/auth.setup.ts index 09a71edc..14931c12 100644 --- a/e2e/tests/auth.setup.ts +++ b/e2e/tests/auth.setup.ts @@ -1,14 +1,21 @@ -import { env } from "@/env"; import { test as setup } from "@playwright/test"; const authFile = "e2e/.auth/user.json"; const user = { - email: env.E2E_GITHUB_USER_EMAIL, - password: env.E2E_GITHUB_USER_PASSWORD, + email: process.env.E2E_GITHUB_USER_EMAIL, + password: process.env.E2E_GITHUB_USER_PASSWORD, }; setup("authenticate", async ({ page }) => { + if (!user.email) { + throw new Error("e2e github user email is missing"); + } + + if (!user.password) { + throw new Error("e2e github user password is missing"); + } + await page.goto("/"); await page