wordpress-theme-check-action
v1.4.11
Published
Run Theme Check test for a WordPress theme
Downloads
639
Readme
WordPress Theme Check Action
This code action runs various test suites to help WordPress theme development.
Requirements
- NodeJs
- NPM
- Docker
Triggers
- NPX
- GitHub Actions
- Locally
Running via NPX
Inside of your WordPress theme folder, run npx wordpress-theme-check-action
.
Output Location: Console
Windows is currently not supported.
Running via GitHub Actions
You can run this project on GitHub. Here is an example GitHub action workflow file:
name: Test My Theme
on:
push:
branches: [ main ] ## Change the branch name to match yours
pull_request:
branches: [ main ] ## Change the branch name to match yours
jobs:
run_tests:
runs-on: ubuntu-latest
steps:
## We need to keep this around until Gutenberg 9.6 is launched.
- uses: actions/setup-node@v1
with:
node-version: '12'
- name: Theme Test
id: test
uses: Wordpress/theme-review-action@trunk
with:
accessible-ready: true
ui-debug: true
- uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: Screenshots
Github Action Inputs
| Input | Type | Description |
| ------------------ | ------- | ---------------------------------------------------------------------- |
| root-folder
| string | Location of your theme's root folder |
| accessible-ready
| boolean | Whether we should run the additional accessibility tests |
| ui-debug
| boolean | Setting this to true will save some screenshot artifacts for debugging |
Output Location: GitHub Annotations
Locally
- Run
git clone [email protected]:WordPress/theme-review-action.git && cd theme-review-action
. - Run
npm install
to install dependencies. - Run
npm run start
.
The tests run on files within the /test-theme
folder.
You can pass a relative path to your theme like so: npm run start --pathToTheme=../my-theme
.
To see all the options run npm run start -- --help
.
Output Location: /logs
folder. Files are replaced on each test run.