diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bafabf4..513d623 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,7 @@ on: pull_request: branches: - main + workflow_dispatch: jobs: test-app: @@ -27,8 +28,7 @@ jobs: - name: Setup server working-directory: server run: npm i - env: - JWT_SECRET_KEY: ${{secrets.JWT_SECRET_KEY}} + - name: Setup socket working-directory: socket @@ -43,6 +43,11 @@ jobs: run: | nohup npm run start:test & sleep 10 + env: + JWT_SECRET_KEY: ${{secrets.JWT_SECRET_KEY}} + VITE_SERVER_HOST: 0.0.0.0 + VITE_SERVER_PORT: 5173 + - name: install playwright browser working-directory: client @@ -51,6 +56,9 @@ jobs: - name: Run Playwright tests working-directory: client run: npx playwright test --reporter=line + env: + VITE_SERVER_HOST: 0.0.0.0 + VITE_SERVER_PORT: 5173 - uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} diff --git a/client/tests/auth.spec.ts b/client/tests/auth.spec.ts index f375e15..e756f58 100644 --- a/client/tests/auth.spec.ts +++ b/client/tests/auth.spec.ts @@ -11,8 +11,8 @@ async function registerUser(page: Page) { const email = `${generateString()}@${generateString()}.com`; const name = generateString(); const password = generateStrongPassword(); - await page.goto('0.0.0.0:5173/register'); - // await page.goto('http://localhost:5173/register'); + // await page.goto('0.0.0.0:5173/register'); + await page.goto('http://localhost:5173/register'); await page.getByPlaceholder('Name').fill(name); await page.getByPlaceholder('Email').fill(email); await page.getByPlaceholder('Password').fill(password);