e2e 테스트 수정
CI / test (push) Successful in 4m41s
CI / e2e (push) Has been skipped
CI / pr_and_merge (push) Successful in 1m33s

This commit is contained in:
2025-12-02 12:15:05 +09:00
parent c331d5e14a
commit 5832b64d39
3 changed files with 70 additions and 12 deletions
+48 -3
View File
@@ -48,10 +48,55 @@ jobs:
run: |
npm test
e2e:
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: app
POSTGRES_PASSWORD: app_password
POSTGRES_DB: page_builder
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready -U app -d page_builder"
--health-interval=5s
--health-timeout=3s
--health-retries=20
env:
DATABASE_URL: postgresql://app:app_password@postgres:5432/page_builder?schema=public
AUTH_JWT_SECRET: ${{ secrets.AUTH_JWT_SECRET }}
AUTH_ENCRYPTION_KEY: ${{ secrets.AUTH_ENCRYPTION_KEY }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: Run Prisma migrations
run: npx prisma migrate deploy
- name: Build Next.js app
run: npm run build
- name: Run Playwright E2E tests
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
npx playwright test
run: npm run e2e
pr_and_merge:
needs: test