Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Plugin Check workflow #20808

Open
wants to merge 20 commits into
base: trunk
Choose a base branch
from
Open
Changes from all commits
Commits
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
57 changes: 57 additions & 0 deletions .github/workflows/plugin-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: 'Plugin Check'
on:
pull_request:
push:
branches:
- main
- trunk
- 'release/**'

jobs:
prepare:
name: "Build and check plugin"
# Don't run on forks.
if: github.repository_owner == 'Yoast'

runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.2
coverage: none

- name: Set up node and enable caching of dependencies
uses: actions/setup-node@v3
with:
node-version: '14'
cache: 'yarn'

- name: Install Composer dependencies and run the prefixing script
uses: ramsey/composer-install@v2
with:
# Bust the cache at least once a week - output format: YYYY-MM-DD.
custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F")

- name: Yarn install
run: yarn install

- name: "Grunt: create plugin"
run: |
grunt artifact
mv artifact wordpress-seo

- name: Run plugin check
uses: swissspidy/wp-plugin-check-action@main
with:
build-dir: ./wordpress-seo
exclude-directories: vendor_prefixed
exclude-checks: |
trademarks
late_escaping
plugin_updater
plugin_review_phpcs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
plugin_review_phpcs
plugin_review_phpcs
plugin_readme

Addresses the The Stable Tag in your readme file does not match the version in your main plugin file. warning.

Given that this is a development repo for the next release, the stable tag will never match, so it doesn't really make sense to check it.

This also skips some other checks within Plugin_Readme_Check (such as for valid license), but for an established plugin like this I think it's fine.

Loading