Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
f838d20
Update tests.yml
Jun 4, 2022
77ffe4b
Use terminus instead of ssh to access wp-cli
Jun 5, 2022
6e00fb2
Typo
Jun 5, 2022
949a26f
Use variables instead of getenv.
Jun 5, 2022
13c1dee
Run when there is a commit to master
Jun 5, 2022
909dac9
Fix syntax. Run on any push
Jun 5, 2022
368f549
Don't try to update terminus after just downloading it.
Jun 5, 2022
35d7837
List files of the current directory
Jun 5, 2022
69c5fca
Don't put terminus in a folder under ~
Jun 5, 2022
2e34a91
Remove the dot slash before terminus
Jun 5, 2022
bc82259
List /usr/local/bin/terminus
Jun 5, 2022
b7fd50f
Just list /usr/local/bin
Jun 5, 2022
0fa100d
Add a symlink for terminus
Jun 5, 2022
aeecefb
Typo
Jun 5, 2022
3337227
Use an absolute path on the symlink
Jun 5, 2022
6ffb4da
Also list the pwd's contents
Jun 5, 2022
473c49c
Try to symlink as root
Jun 5, 2022
9d7eafc
Load the Pantheon secrets
Jun 5, 2022
c2185f8
Enable verbose (x3) terminus logging.
Jun 5, 2022
c60ac31
Merge branch 'master' of github.com:WordPress/phpunit-test-runner
jazzsequence Sep 17, 2024
5f6e4d7
update actions
jazzsequence Sep 17, 2024
f08e6bd
remove if false
jazzsequence Sep 17, 2024
14c0e8f
install terminus in the action
jazzsequence Sep 17, 2024
6602d1b
remove the terminus install from prepare
jazzsequence Sep 17, 2024
9f956f9
run on push to main
jazzsequence Sep 17, 2024
8ffa5d9
wp -> wordpress
jazzsequence Sep 17, 2024
c1efec7
run terminus auth:login
jazzsequence Sep 17, 2024
6123443
add drush.in to ssh-rsa config
jazzsequence Sep 17, 2024
47ed24d
output the fingerprint of the ssh key
jazzsequence Sep 17, 2024
cf275c2
use /dev/stdin
jazzsequence Sep 17, 2024
bed7d3c
remove the ssh key checking step
jazzsequence Sep 17, 2024
1e81944
commit the cleanup
jazzsequence Sep 17, 2024
51904ea
set sftp
jazzsequence Sep 17, 2024
44e0903
fix terminus command
jazzsequence Sep 17, 2024
741175a
extend timeout
jazzsequence Sep 18, 2024
11ffdf2
tweak the test script
jazzsequence Sep 18, 2024
303c84a
fix env for cleanup
jazzsequence Sep 18, 2024
27424ed
Merge branch 'master' of github.com:WordPress/phpunit-test-runner
jazzsequence Aug 26, 2025
00e0740
bump php version
jazzsequence Aug 26, 2025
13cf9ca
can we spit out some info about the site?
jazzsequence Aug 26, 2025
865a537
add db port
jazzsequence Aug 26, 2025
bfeb44d
DELENG-444: Establish DevRel ownership
lowlostrong Apr 14, 2026
dde4dc2
Merge pull request #1 from pantheon-systems/deleng-444/devrel-ownership
lowlostrong Apr 14, 2026
25cfe0b
Add Pantheon-specific WordPress PHPUnit test runner (#2)
jazzsequence Jun 22, 2026
6fdf663
Reconcile with upstream WordPress/phpunit-test-runner
jazzsequence Jun 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 0 additions & 92 deletions .github/workflows/props-bot.yml

This file was deleted.

103 changes: 77 additions & 26 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,47 +20,81 @@ on:
# - cron: '0 0 * * *'
# Every 30 minutes.
# - cron: '0/30 * * * *'
push:
branches:
- main
workflow_dispatch:
inputs:
test_group:
description: 'Run only tests in this @group. Defaults to full suite.'
required: false
default: ''
type: choice
options:
- ''
- actions
- canonical
- comment
- cron
- db
- feed
- filters
- formatting
- http
- image
- l10n
- media
- ms-site
- option
- post
- query
- rest-api
- rewrite
- taxonomy
- themes
- upload
- user
- utf8
test_filter:
description: 'PHPUnit --filter pattern — matches against class and method names. Examples: Tests_DB, Tests_Options, Tests_Post_Types::test_register. Overrides test_group if set.'
required: false
default: ''

# Cancels all previous workflow runs for pull requests that have not completed.
# Only one run at a time — prevents simultaneous runs from conflicting
# over the same wptests_* tables on the shared Pantheon environment.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
# Tests the PHPUnit test runner.
# Runs the WordPress PHPUnit test suite on the Pantheon environment via Terminus.
#
# Performs the following steps:
# - Checks out the repository.
# - Installs PHP.
# - Installs NodeJS 14 with caching configured.
# - Prepares the environment for tests.
# - Runs the tests.
# - Reports the results.
# - Cleans up.
# Flow:
# 1. Prepare: git clone wordpress-develop locally, rsync to Pantheon, run composer on Pantheon.
# 2. Test: run PHPUnit on Pantheon via terminus remote:wp eval --skip-wordpress.
# 3. Report: rsync results from Pantheon, upload to WordPress.org.
# 4. Cleanup: remove test dir on Pantheon and locally.
test:
name: Run Core PHPUnit tests
runs-on: ubuntu-latest

# Remove this line if Github Actions is your preferred means of running the tests.
if: ${{ false }}
timeout-minutes: 120

env:
# This is only a subset/example of env vars available. See the `.env.default` file for a full list.
WPT_PREPARE_DIR: ${{ secrets.WPT_PREPARE_DIR }}
WPT_TEST_DIR: ${{ secrets.WPT_TEST_DIR }}
WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }}
WPT_PHP_EXECUTABLE: ${{ secrets.WPT_PHP_EXECUTABLE }}
# Database settings
WPT_DB_NAME: ${{ secrets.WPT_DB_NAME }}
WPT_DB_USER: ${{ secrets.WPT_DB_USER }}
WPT_DB_PASSWORD: ${{ secrets.WPT_DB_PASSWORD }}
WPT_DB_HOST: ${{ secrets.WPT_DB_HOST }}
# SSH settings for connecting to the test environment.
WPT_SSH_CONNECT: ${{ secrets.WPT_SSH_CONNECT }}
# PHP binary on the Pantheon container — use 'php' so it follows whatever
# version the environment is configured to run, without hardcoding a version.
WPT_PHP_EXECUTABLE: php
# SSH key for Terminus SSH operations (remote:wp, remote:composer).
WPT_SSH_PRIVATE_KEY_BASE64: ${{ secrets.WPT_SSH_PRIVATE_KEY_BASE64 }}
# Pantheon-specific variables.
PANTHEON_SITE_NAME: ${{ secrets.PANTHEON_SITE_NAME }}
PANTHEON_SITE_ENV: ${{ secrets.PANTHEON_SITE_ENV }}
TERMINUS_MACHINE_TOKEN: ${{ secrets.TERMINUS_MACHINE_TOKEN }}
# Optional test scoping — set via workflow_dispatch inputs.
WPT_TEST_GROUP: ${{ inputs.test_group }}
WPT_TEST_FILTER: ${{ inputs.test_filter }}

steps:
- name: Checkout repository
Expand All @@ -69,14 +103,31 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
with:
php-version: '7.4'
php-version: '8.4'
coverage: none

- name: Install NodeJS
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20

- name: Install Terminus
uses: pantheon-systems/terminus-github-actions@409451ede17f75acac08f42edc823fee6c435057 # v1
with:
pantheon-machine-token: ${{ secrets.TERMINUS_MACHINE_TOKEN }}

- name: Install Terminus plugins
run: |
terminus self:plugin:install pantheon-systems/terminus-composer-plugin

- name: Wake and configure Pantheon environment
run: |
terminus art wordpress
terminus env:wake ${{ secrets.PANTHEON_SITE_NAME }}.${{ secrets.PANTHEON_SITE_ENV }}
terminus site:info ${{ secrets.PANTHEON_SITE_NAME }}
terminus env:info ${{ secrets.PANTHEON_SITE_NAME }}.${{ secrets.PANTHEON_SITE_ENV }}
terminus connection:set ${{ secrets.PANTHEON_SITE_NAME }}.${{ secrets.PANTHEON_SITE_ENV }} sftp

- name: Prepare environment
run: php prepare.php

Expand Down
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @pantheon-systems/devrel
Loading