Skip to content

Testing

Testing #2046

Workflow file for this run

name: Testing
on:
workflow_dispatch:
push:
branches:
- main
- master
pull_request:
schedule:
- cron: '0 0 * * *' # Run every day at midnight.
# Each run fans out to 155 jobs, so overlapping runs are expensive.
# Keying on the ref lets a new push supersede the run it replaces, for pull
# requests and branches alike. Keying on the event as well keeps a push to the
# default branch and the nightly schedule from cancelling each other, since both
# report the same ref.
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
jobs:
functional:
name: ${{ matrix.test-package }}
strategy:
fail-fast: false
matrix:
php: ['7.4', '8.5']
wp: ['latest', 'trunk']
dbtype: ['mysql', 'sqlite']
object_cache: ['none', 'sqlite']
use-phar: [false, true]
test-package:
- wp-cli-bundle
- wp-cli
- ability-command
- ai-command
- block-command
- cache-command
- checksum-command
- config-command
- core-command
- cron-command
- db-command
- embed-command
- entity-command
- eval-command
- export-command
- extension-command
- i18n-command
- import-command
- language-command
- maintenance-mode-command
- media-command
- package-command
- rewrite-command
- role-command
- scaffold-command
- search-replace-command
- server-command
- shell-command
- site-health-command
- super-admin-command
- widget-command
exclude:
# Object cache runs only on sqlite dbtype
- dbtype: mysql
object_cache: sqlite
# SQLite runs only on WP latest and PHP 8.5
- dbtype: sqlite
wp: trunk
- dbtype: sqlite
php: '7.4'
# Object cache runs only with WP latest
- object_cache: sqlite
wp: trunk
# A1: object_cache=sqlite only on PHP 8.5
- php: '7.4'
object_cache: sqlite
# Phar and source are separate dimensions, not aliases for a WP
# version. Previously `use-phar: true` was excluded on trunk and
# `use-phar: false` on latest, which made the two fully determined by
# each other: the Phar was only ever tested against WP latest and
# source only against trunk, so source-on-latest — the ordinary local
# setup — went untested entirely.
#
# Cross them instead, dropping only the combinations that add no
# signal, which keeps the run under the 256-job matrix cap. What this
# buys is source against WP latest, and the Phar against trunk as an
# early warning that a WP change has broken the released binary.
# Neither of those runs with continue-on-error, so both can fail the
# build.
- php: '7.4'
wp: latest
use-phar: false
- dbtype: sqlite
use-phar: false
# Limit ancient php on trunk
- php: '7.4'
wp: trunk
uses: ./.github/workflows/reusable-testing.yml
with:
test-package: ${{ matrix.test-package }}
php: ${{ matrix.php }}
wp: ${{ matrix.wp }}
dbtype: ${{ matrix.dbtype }}
object_cache: ${{ matrix.object_cache }}
use-phar: ${{ matrix.use-phar }}