Skip to content

Merge pull request #807 from WordPress/publish/2.6.0 #1853

Merge pull request #807 from WordPress/publish/2.6.0

Merge pull request #807 from WordPress/publish/2.6.0 #1853

Workflow file for this run

name: Unit Testing
on:
push:
branches:
- trunk
- 'release/**'
# Only run if PHP-related files changed.
paths:
- '.github/workflows/php-test.yml'
- '**.php'
- '.wp-env.json'
- '**/package.json'
- 'package-lock.json'
- 'phpunit.xml.dist'
- 'tests/multisite.xml'
- 'composer.json'
- 'composer.lock'
pull_request:
branches:
- trunk
- 'release/**'
- 'feature/**'
# Only run if PHP-related files changed.
paths:
- '.github/workflows/php-test.yml'
- '**.php'
- '.wp-env.json'
- '**/package.json'
- 'package-lock.json'
- 'phpunit.xml.dist'
- 'tests/multisite.xml'
- 'composer.json'
- 'composer.lock'
types:
- opened
- reopened
- synchronize
jobs:
php-test:
name: PHP
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: styfle/[email protected]
- uses: actions/checkout@v3
- name: Setup Node.js (.nvmrc)
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: npm
- name: npm install
run: npm ci
- name: Install WordPress
run: npm run wp-env start
- name: Running single site unit tests
run: npm run test-php
- name: Running multisite unit tests
run: npm run test-php-multisite