Skip to content

Generated GitHub Action workflow has issues preventing execution #378

@andrewshell

Description

@andrewshell

Bug Report

Describe the current, buggy behavior

The generated output in .github/workflows/testing.yaml fails for two reasons:

  1. The line php-version: ${{ matrix.php-version }} is interpreted as handlebar delimeters and is output as php-version: $, causing the following error in the "Setup PHP" step: PHP Could not setup PHP $.0
  2. Once the php-version is corrected manually, you get a second error in the "Setup tests" step: Error: svn is not installed. Please install svn and try again.

Describe how other contributors can replicate this bug

  • Usewp scaffold plugin sample-plugin --ci=github to create a new plugin with GitHub actions configured.
  • Initialize as a new repo, add all, commit, and push to main in a new GitHub repo
  • Create a new feature branch
  • Remove <exclude>./tests/test-sample.php</exclude> line from phpunit.xml.dist so the sample test will run.
  • Commit and push the feature branch to origin.
  • On GitHub, create a new pull request from the feature branch.
  • The actions will start, and all three will fail.

Describe what you would expect as the correct outcome

I would expect three actions to run and succeed, one for each version of PHP in the test matrix.

Let us know what environment you are running this on

OS:	Darwin 25.3.0 Darwin Kernel Version 25.3.0: Wed Jan 28 20:54:55 PST 2026; root:xnu-12377.91.3~2/RELEASE_ARM64_T8132 arm64
Shell:	/bin/zsh
PHP binary:	/opt/homebrew/Cellar/php@8.3/8.3.30/bin/php
PHP version:	8.3.30
php.ini used:	/opt/homebrew/etc/php/8.3/php.ini
MySQL binary:	
MySQL version:	
SQL modes:	
WP-CLI root dir:	phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:	phar://wp-cli.phar/vendor
WP_CLI phar path:	phar:///Users/andrewshell/bin/wp
WP-CLI packages dir:	
WP-CLI cache dir:	/Users/andrewshell/.wp-cli/cache
WP-CLI global config:	
WP-CLI project config:	
WP-CLI version:	2.12.0

Provide a possible solution

At the top of plugin-github.mustache, you can add: {{=<% %>=}} to change the delimiters.

Then add a new step before "Setup tests" that installs SVN:

- name: Install SVN
  run: sudo apt-get update && sudo apt-get install -y subversion

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions