e2e 테스트 수정
This commit is contained in:
+48
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user