johnbillion / plugin-infrastructure
Reusable infrastructure relating to testing, building, and deploying my WordPress plugins
Fund package maintenance!
johnbillion
Installs: 34 445
Dependents: 5
Suggesters: 0
Security: 0
Stars: 17
Watchers: 4
Forks: 1
Open Issues: 7
Language:Shell
Requires
- php: >=7.4
This package is auto-updated.
Last update: 2025-01-13 21:12:29 UTC
README
Reusable infrastructure relating to testing, building, and deploying my WordPress plugins (see the "Used by" section below).
Provided without support, warranty, guarantee, backwards compatibility, fitness for purpose, resilience, safety, sanity, beauty, or support for any plugin that isn't one of mine.
Used by
Overview
Plugins that use this library all use a similar setup in their workflows:
Acceptance testing
- Push to a main branch or pull request,
acceptance-tests.yml
fires- Constructs a matrix of supported PHP and WordPress versions
- Uses
reusable-acceptance-tests.yml
- Installs PHP and WordPress
- Runs the build
- Runs acceptance testing with wp-browser
Integration testing
- Push to a main branch or pull request,
integration-tests.yml
fires- Constructs a matrix of supported PHP and WordPress versions
- Uses
reusable-integration-tests.yml
- Installs PHP and WordPress
- Runs the build
- Runs integration testing with wp-browser, once for:
- Single site
- Multisite
Coding standards testing
- Push to a main branch or pull request,
coding-standards.yml
fires- Uses
reusable-coding-standards.yml
- Installs PHP
- Checks coding standards with PHPCS
- Uses
Static analysis
- Push to a main branch or pull request,
static-analysis.yml
fires- Constructs a matrix of supported PHP versions
- Uses
reusable-static-analysis.yml
- Installs PHP
- Runs static analysis with PHPStan
Workflow file linting
- Push to a main branch or pull request,
lint-workflows.yml
fires- Uses
reusable-workflow-lint.yml
- Lints all GitHub Actions workflow files for correctness and security using:
- ActionLint
- Octoscan
- Zizmor
- Poutine
- OpenSSF Scorecard
- Uploads results to GitHub Code Scanning
- Lints all GitHub Actions workflow files for correctness and security using:
- Uses
Deployment to WordPress.org
- Push to the
release
branch,build.yml
fires- Uses
reusable-build.yml
- Runs the build
- Reads version from
package.json
- Commits built files
- Pushes to
release-$VERSION
- Tags the new version and pushes
- Creates a draft release
- Uses
- Publish the release,
deploy-tag.yml
fires- Uses
reusable-deploy-tag.yml
- Creates a changelog entry from the release notes
- Uses
10up/action-wordpress-plugin-deploy
- Deploys the new version to WordPress.org
- Generates a zip file
- Uses
johnbillion/action-wordpress-plugin-attestation
- Fetches the zip from WordPress.org
- Generates a build provenance attestation if the zip contents matches the build
- Closes the completed milestone for the release
- Creates the next major, minor, and patch release milestones
- Uses
Licence
MIT