-
Notifications
You must be signed in to change notification settings - Fork 902
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
adamsilverstein
wants to merge
20
commits into
Yoast:trunk
Choose a base branch
from
adamsilverstein:add/plugin-check-action
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+57
−0
Open
Add Plugin Check workflow #20808
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
900e4df
Add Plugin Check workflow
adamsilverstein 7787970
Add build step, check build folder
adamsilverstein 1a3515a
Ensure correct node version is used
adamsilverstein 9e4b835
Add node setup
adamsilverstein 253b7e1
reset action
adamsilverstein 3ccd509
build file update
adamsilverstein d3246a3
build file update-2
adamsilverstein ca9b655
Action cleanup
adamsilverstein 212a320
Simplify action
adamsilverstein 5c64abb
Action cleanup
adamsilverstein c428028
Adjust build path
adamsilverstein 858bd58
Use `grunt artifact` for build
adamsilverstein 726daf0
Update .github/workflows/plugin-check.yml
adamsilverstein 48733cd
remove composer copy command, not needed
adamsilverstein b18264e
Update .github/workflows/plugin-check.yml
adamsilverstein 44029da
Merge branch 'trunk' into add/plugin-check-action
adamsilverstein 9a8092a
try renaming plugin to match slug
adamsilverstein b170f13
try wildcard exlusion
adamsilverstein b93a8f2
Correct exclude check slug
adamsilverstein 4b0a81a
plugin_updater_detected -> plugin_updater
adamsilverstein File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.