Skip to content

E2E: Setting up the environment. #91

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 26, 2025
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
39 changes: 39 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: E2E Tests

on:
pull_request:
branches: [trunk]

jobs:
test:
name: Playwright e2e Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

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

- name: Install dependencies
run: |
npm ci
composer install --prefer-dist --no-progress

- name: Install wp-env
run: npm install -g @wordpress/env

- name: Start wp-env
run: wp-env start

- name: Install Playwright browsers
run: npx playwright install --with-deps chromium

- name: Run e2e tests
run: npm run test:e2e

- name: Stop wp-env
if: always()
run: wp-env stop
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,10 @@ assets/build/**/*.php

# PHPUnit result cache
.phpunit.result.cache

# Playwright
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
/artifacts/
Loading