Skip to content

feat: add E2E test support with wp-scripts and Playwright #445

feat: add E2E test support with wp-scripts and Playwright

feat: add E2E test support with wp-scripts and Playwright #445

Workflow file for this run

name: Test PHP
on:
push:
branches-ignore:
- "master"
jobs:
phplint:
name: PHP Lint
runs-on: ubuntu-22.04
steps:
- name: Setup PHP version
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
extensions: simplexml
- name: Checkout source code
uses: actions/checkout@v4
- name: Install composer
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run PHPCS
run: composer run lint
phpunit:
name: PHPUnit
runs-on: ubuntu-22.04
strategy:
matrix:
php: [ "7.4", "8.0" ]
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Setup PHP version
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: simplexml, mysql
tools: phpunit-polyfills
- name: Checkout source code
uses: actions/checkout@v4
- name: Install WordPress Test Suite
run: |
bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:${{ job.services.mysql.ports['3306'] }}
- name: Install composer
run: composer install --prefer-dist --no-progress --no-suggest --no-dev
- name: Run phpunit
run: phpunit