Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Playwright End-to-End Tests

on:
push:
branches:
- main
paths:
- "plugins/hwp-previews/**"
pull_request:
branches:
- main
paths:
- "plugins/hwp-previews/**"

jobs:
playwright-e2e-tests:
runs-on: ubuntu-24.04

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Install composer
run: composer install
working-directory: plugins/hwp-previews

- name: Install playwright browsers
run: npx playwright install --with-deps
working-directory: plugins/hwp-previews

- name: Start wp-env
run: |
npm run wp-env start
working-directory: plugins/hwp-previews

- name: Run Playwright tests
run: npm run test:e2e
working-directory: plugins/hwp-previews

- name: Stop wp-env
run: npm run wp-env stop
working-directory: plugins/hwp-previews
Loading
Loading