Skip to content

Lay down foundation for utilizing TransformersRegistry class for transformers registration #372

Lay down foundation for utilizing TransformersRegistry class for transformers registration

Lay down foundation for utilizing TransformersRegistry class for transformers registration #372

Workflow file for this run

name: Tests (WP plugin)
on:
pull_request:
types: [ opened, synchronize ]
jobs:
phpunit:
name: PHPUnit ${{ matrix.php }}
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
ports:
- 3306/tcp
env:
MYSQL_ROOT_PASSWORD: password
# Set health checks to wait until mysql has started
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 3
strategy:
fail-fast: false
matrix:
php: [ '8.3' ]
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Setup npm
uses: actions/setup-node@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: 'none'
tools: composer
- name: Install dependencies
uses: ramsey/composer-install@v2
with:
composer-options: "--no-progress --no-ansi --no-interaction"
- name: Build schema.json
run: npm install && npm run build:schema
- name: Install WordPress test setup
run: bash tests/bin/install-wp-tests.sh wordpress_test root password 127.0.0.1:${{ job.services.mysql.ports[3306] }} latest
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Run tests
env:
WP_TESTS_DIR: /tmp/wordpress-tests-lib/
PHPUNIT_UNDER_GITHUB_ACTIONS: true
run: src/plugin/vendor/bin/phpunit