Skip to content

Automattic/vip-integrations-starter-kit

 
 

Repository files navigation

WordPress VIP Integration Starter Kit

Welcome to WordPress VIP! This repository is a starting point for developing an integration and submitting for the Integrations Center.

It contains an example of fully configured VIP local and cloud development environments along with unit tests, end-to-end tests, static analysis and linting.

Utilizing these tools will allow you to submit the new versions of your integrations and us to deploy the code with confidence.

Technology

We used tools that we consider the best technology in the industry with convenience in mind. These are the tools we use on a day-to-day basis to ensure code quality on WordPress VIP platform.

Unit Tests

We utilize PHPUnit 9 for unit tests. For an example of a test suite please refer to /tests/phpunit folder.

End-to-end tests

For end-to-end tests we use Playwright. Examples can be found in /tests/e2e.

Static analysis

Psalm is a free & open-source static analysis tool that helps you identify problems in your code.

Please note, for Psalm to work properly you will need to annotate your PHP code. For examples please refer to /plugins/my-integration.

Linting and coding standards.

Linting and coding standards are powered by PHP_CodeSniffer (commonly known as PHPCS) along with WordPress VIP and WordPress core rulesets.

For more information please refer to linting doc.

GitHub Actions

Repository structure

⚠️ You may notice the repository contains several folders. These should not be removed as they constitute a complete WordPress VIP application. A brief description is available in /docs/directories.md

For more information on how our codebase is structured, see https://docs.wpvip.com/technical-references/vip-codebase/.

Local installation and development

To fully leverage the starter kit you will need to have the following tools installed: Composer, Node.js, NPM (installed with Node.js), Docker, VIP-CLI.

📝 While we usually recommend Docker Desktop we understand that it may be not possible to utilize it for your organization. The Starter Kit is compatible with alternative container runtimes like Colima and Rancher Desktop. For details please refer to our documentation.

Assuming you have prerequisites installed, follow these steps to set up the local environment.

  1. Clone the repository and make it your own.
  2. Change the working directory to your repository.
  3. Install Composer dependencies
composer require
  1. Install Node.js dependencies
npm i
  1. Create and start a WPVIP local development instance:
vip dev-env create
vip dev-env start
  1. Write code, write tests. Or the other way around!

📝 For convenience, this repository contains a special configuration file vip-dev-env.yml, feel free to tweak it to your needs. For more in-depth guide to VIP Local Development Environments please refer to our documentation site.

Cloud-based development

We leverage GitHub Codespaces. There are no set up steps. On the first start of the codespace it will take a few minutes to build. Once the build runs you'll have a working environment. You can use either Web-based editor or local VSCode.

Submitting your plugin to WordPress VIP Integrations Center

Once you're confident your code is ready for the prime time, please contact your Technology Partner Manager for the next steps.

About

All you need to develop a WPVIP integration with confidence.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 83.1%
  • HTML 9.6%
  • TypeScript 5.2%
  • CSS 2.0%
  • Shell 0.1%