Skip to content

Workflow file for this run

name: PHPUnit
on: [push]
jobs:
php-test:
name: "PHP ${{ matrix.php }} / WP ${{ matrix.wp }}"
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
php: ['8.2', '8.1', '7.4']
wp: [ 'latest' ]
include:
- php: '7.4'
wp: '6.3'
- php: '8.3'
wp: 'trunk'
env:
WP_ENV_PHP_VERSION: ${{ matrix.php }}
WP_ENV_CORE: ${{ matrix.wp == 'trunk' && 'WordPress/WordPress' || format( 'https://wordpress.org/wordpress-{0}.zip', matrix.wp ) }}
steps:
- uses: styfle/cancel-workflow-action@0.11.0
- uses: actions/checkout@v3
- name: Setup Node.js (.nvmrc)
uses: actions/setup-node@v3
with:
node-version: '20'
cache: npm
- name: Composer update
run: composer update
- 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