Skip to content

MR-15: Local dev env and CI/CD pipelines#19

Open
av3nger wants to merge 11 commits into
mainfrom
feature/MR-15-dev-env
Open

MR-15: Local dev env and CI/CD pipelines#19
av3nger wants to merge 11 commits into
mainfrom
feature/MR-15-dev-env

Conversation

@av3nger

@av3nger av3nger commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Modernises the plugin's tooling - repo layout, local dev environment, automated tests, linting, and the release pipeline. The plugin now lives at the repo root, local dev runs on wp-env, and CI covers tests, PHP compatibility, and coding standards. Releases to WordPress.org are automated from GitHub Releases.

What's included

  • Layout + dev env: plugin flattened to the repo root; Docker stack replaced with @wordpress/env (.wp-env.json + env:* npm scripts); assets/.wordpress-org/.
  • Tests: PHPUnit suite + bin/install-wp-tests.sh; phpunit.yml CI matrix (PHP 7.4–8.4 × WP, multisite, nightly).
  • Lint + compat: phpcs.xml (WordPress standard, 2-space) + .editorconfig; composer lint/compat scripts; lint.yml with a blocking PHP 7.4+ compatibility gate and advisory coding-standards job (legacy backlog).
  • Pre-commit: husky + lint-staged running phpcs-changed on staged PHP - checks only changed lines, so the legacy backlog never blocks a commit.
  • Release pipeline: .distignore (ships only the plugin; keeps vendor/reporting.php); deploy.yml; build-zip.yml (manual workflow_dispatch to build a test zip from any branch).

Test plan

  • composer compat → exits 0 (blocking gate, PHP 7.4+).
  • composer lint → runs; legacy findings are advisory only (does not block).
  • Pre-commit: staging a PHP file with a new error blocks the commit; merely touching a legacy file (clean change) commits fine. --no-verify bypasses.
  • Open a PR → confirm PHPUnit, PHP compatibility (blocking), and Coding standards (advisory) jobs behave as expected.
  • Actions → Build release zip → run on any branch → unzip the artifact and confirm it contains src/, views/, js/build/, vendor/reporting.php and excludes node_modules/, tests/, js/src/, dev configs.
  • Deploy (release only): add SVN_USERNAME/SVN_PASSWORD secrets; tag with the bare version (e.g. 1.78.0) - a mismatched tag fails the version check. Optionally dry-run: true once before a real release.
  • npm run env:start to init a local environment using Docker

On latest node versions, if the wp-env command fails with ETIMEDOUT error, run the following command before npm run env:start:
export NODE_OPTIONS="--network-family-autoselection-attempt-timeout=5000 --dns-result-order=ipv4first"


Note

Medium Risk
No plugin runtime logic changes in the diff, but automated WordPress.org SVN deploy and packaging rules directly affect what ships to production sites if misconfigured.

Overview
Flattens the plugin to the repository root and retires the Docker Compose stack (docker-compose.yml, docker-provision.sh, envfile) in favor of @wordpress/env via .wp-env.json and env:* npm scripts. Contributor docs (README.md, AGENTS.md) and WordPress.org assets move to .wordpress-org/.

Adds Composer dev tooling (composer.json) with PHPUnit, PHPCS, and PHP 7.4+ compatibility checks, plus bin/install-wp-tests.sh for the CI test harness. GitHub Actions run a PHPUnit matrix (phpunit.yml), a blocking compat gate and advisory PHPCS (lint.yml), manual release zips (build-zip.yml), and WordPress.org deploy on GitHub release (deploy.yml) with tag vs readme.txt Stable tag validation and zip upload.

.distignore defines what ships to SVN (dev files excluded; vendor/reporting.php still ships via gitignore strategy). .gitignore now ignores node_modules, build output, and Composer vendor except committed vendor/reporting.php. Husky + lint-staged run phpcs-changed on staged PHP in pre-commit.

Reviewed by Cursor Bugbot for commit 472f33f. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@av3nger, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 23 minutes and 41 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: TheCodeCompany/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8b84c803-ae31-407c-9e09-76f1d6f6ede6

📥 Commits

Reviewing files that changed from the base of the PR and between 26e44f1 and 472f33f.

⛔ Files ignored due to path filters (25)
  • .wordpress-org/banner-1544x500.png is excluded by !**/*.png
  • .wordpress-org/banner-772x250.jpg is excluded by !**/*.jpg
  • .wordpress-org/icon-128x128.jpg is excluded by !**/*.jpg
  • .wordpress-org/icon-256x256.jpg is excluded by !**/*.jpg
  • .wordpress-org/icon.svg is excluded by !**/*.svg
  • .wordpress-org/screenshot-1.jpg is excluded by !**/*.jpg
  • .wordpress-org/screenshot-10.jpg is excluded by !**/*.jpg
  • .wordpress-org/screenshot-11.jpg is excluded by !**/*.jpg
  • .wordpress-org/screenshot-12.jpg is excluded by !**/*.jpg
  • .wordpress-org/screenshot-13.jpg is excluded by !**/*.jpg
  • .wordpress-org/screenshot-14.jpg is excluded by !**/*.jpg
  • .wordpress-org/screenshot-15.jpg is excluded by !**/*.jpg
  • .wordpress-org/screenshot-16.jpg is excluded by !**/*.jpg
  • .wordpress-org/screenshot-17.jpg is excluded by !**/*.jpg
  • .wordpress-org/screenshot-18.jpg is excluded by !**/*.jpg
  • .wordpress-org/screenshot-19.jpg is excluded by !**/*.jpg
  • .wordpress-org/screenshot-2.jpg is excluded by !**/*.jpg
  • .wordpress-org/screenshot-3.jpg is excluded by !**/*.jpg
  • .wordpress-org/screenshot-4.jpg is excluded by !**/*.jpg
  • .wordpress-org/screenshot-5.jpg is excluded by !**/*.jpg
  • .wordpress-org/screenshot-6.jpg is excluded by !**/*.jpg
  • .wordpress-org/screenshot-7.jpg is excluded by !**/*.jpg
  • .wordpress-org/screenshot-8.jpg is excluded by !**/*.jpg
  • .wordpress-org/screenshot-9.jpg is excluded by !**/*.jpg
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (131)
  • .distignore
  • .editorconfig
  • .github/workflows/build-zip.yml
  • .github/workflows/deploy.yml
  • .github/workflows/lint.yml
  • .github/workflows/phpunit.yml
  • .gitignore
  • .husky/pre-commit
  • .wp-env.json
  • AGENTS.md
  • README.md
  • bin/install-wp-tests.sh
  • composer.json
  • docker-compose.yml
  • docker-provision.sh
  • envfile
  • js/src/admin.js
  • js/src/blocks/extensions/block-visibility/index.js
  • js/src/blocks/extensions/index.js
  • js/src/blocks/paywall-divider/block.json
  • js/src/blocks/paywall-divider/index.js
  • js/src/editor-scripts.js
  • js/src/expiry-banner.js
  • js/src/memberful-wp-tinymce-plugin.js
  • js/src/menu.js
  • memberful-wp.php
  • package.json
  • phpcs.xml
  • phpunit.xml.dist
  • plugin
  • readme.txt
  • release.sh
  • site.conf
  • src/acl.php
  • src/acl/helpers.php
  • src/acl/post_options.php
  • src/acl/term_options.php
  • src/ad-control.php
  • src/admin.php
  • src/admin/editor.php
  • src/api.php
  • src/authenticator.php
  • src/block-editor.php
  • src/block_dashboard_access.php
  • src/bulk_protect.php
  • src/comments_protection.php
  • src/content_filter.php
  • src/contrib/ad-providers.php
  • src/contrib/ad-providers/ad-provider-manager.php
  • src/contrib/ad-providers/advanced-ads.php
  • src/contrib/ad-providers/base-ad-provider.php
  • src/contrib/ad-providers/mediavine-ads.php
  • src/contrib/ad-providers/raptive-ads.php
  • src/contrib/bbpress.php
  • src/contrib/elementor.php
  • src/contrib/sfwd-learndash.php
  • src/contrib/woocommerce.php
  • src/contrib/woothemes-sensei.php
  • src/contrib/wp-ultimate-recipe-premium.php
  • src/contrib/wp-ultimate-recipe.php
  • src/core-ext.php
  • src/cron.php
  • src/embed.php
  • src/endpoints.php
  • src/endpoints/auth.php
  • src/endpoints/check_test_cookie.php
  • src/endpoints/debug.php
  • src/endpoints/set_test_cookie.php
  • src/endpoints/webhook.php
  • src/entities.php
  • src/expiry_banner.php
  • src/filter_account_menu_items.php
  • src/global_marketing.php
  • src/hide_admin_toolbar.php
  • src/logout_hooks.php
  • src/marketing_content.php
  • src/metabox.php
  • src/nav_menus.php
  • src/options.php
  • src/private_user_feed.php
  • src/roles.php
  • src/search_filter.php
  • src/shortcodes.php
  • src/syncing.php
  • src/urls.php
  • src/user/downloads.php
  • src/user/entity.php
  • src/user/feeds.php
  • src/user/map.php
  • src/user/map_stats.php
  • src/user/meta.php
  • src/user/role_decision.php
  • src/user/subscriptions.php
  • src/user/sync_lock.php
  • src/widgets.php
  • stylesheets/admin.css
  • stylesheets/widget.css
  • tests/bootstrap.php
  • tests/test-paywall-divider.php
  • tests/test-plugin-loads.php
  • tests/test-shortcode-args.php
  • tests/test-version-sync.php
  • vendor/reporting.php
  • views/acl_selection.php
  • views/ad-provider-settings.php
  • views/advanced_settings.php
  • views/bulk_protect.php
  • views/comments-template.php
  • views/cookies_test.php
  • views/curl_required.php
  • views/debug.php
  • views/embed.js.php
  • views/expiry-banner.php
  • views/flash.php
  • views/global_marketing.php
  • views/js_vars.php
  • views/login_form_nonce_field.php
  • views/metabox.php
  • views/option_tabs.php
  • views/options.php
  • views/plan_role_mappings.php
  • views/private_user_feed_content.php
  • views/private_user_feed_settings.php
  • views/profile_widget.php
  • views/protect_bbpress.php
  • views/setup.php
  • webpack.config.js
  • wordpress/wp-content/plugins/memberful-wp/.gitignore
  • wordpress/wp-content/plugins/memberful-wp/js/src/expiry-banner.js
  • wordpress/wp-content/plugins/memberful-wp/src/expiry_banner.php
  • wordpress/wp-content/plugins/memberful-wp/views/expiry-banner.php
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/MR-15-dev-env

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@av3nger av3nger changed the title Feature/mr 15 dev env MR-15: Local dev-env and CI/CD pipelines Jun 22, 2026
@av3nger av3nger changed the title MR-15: Local dev-env and CI/CD pipelines MR-15: Local dev env and CI/CD pipelines Jun 22, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7c8fce6. Configure here.

Comment thread .distignore Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant