VOOZH about

URL: https://deepwiki.com/Automattic/BuddyPress-VIP-Go/6.5-cicd-pipeline

⇱ CI/CD Pipeline | Automattic/BuddyPress-VIP-Go | DeepWiki


Loading...
Menu

CI/CD Pipeline

Purpose and Scope

This document describes the continuous integration and continuous deployment (CI/CD) infrastructure for the BuddyPress VIP Go plugin. The pipeline enforces code quality standards, runs automated tests across multiple PHP and WordPress versions, and manages dependency updates through GitHub Actions workflows and Dependabot.

For information about running tests locally during development, see Testing Infrastructure. For code quality standards enforced by the pipeline, see Code Quality and Standards.

CI/CD Architecture Overview

The pipeline consists of three main automation systems:

SystemPurposeTrigger
Integration TestingValidates functionality across WordPress/PHP matrixPR, push to develop/trunk, manual
Code Standards & LintingEnforces PHPCS rules and syntax validationPR, push to develop/trunk, manual
Dependency ManagementAuto-updates GitHub Actions and Composer packagesWeekly schedule (Monday/Tuesday)

All workflows use concurrency control to cancel outdated runs when new commits are pushed to the same branch.

Sources: .github/workflows/integration.yml1-83 .github/workflows/cs-lint.yml1-98 .github/dependabot.yml1-42

Workflow Trigger Architecture


Sources: .github/workflows/integration.yml3-19 .github/workflows/cs-lint.yml3-21 .github/workflows/integration.yml24-27 .github/workflows/cs-lint.yml26-29 .github/dependabot.yml5-19 .github/dependabot.yml21-42

Integration Testing Workflow

The integration.yml workflow validates plugin functionality across different WordPress and PHP version combinations using PHPUnit integration tests.

Test Matrix Strategy


The matrix uses fail-fast: false .github/workflows/integration.yml46 to ensure both configurations run even if one fails, providing complete test coverage feedback.

Sources: .github/workflows/integration.yml37-46

Integration Workflow Execution Steps


Sources: .github/workflows/integration.yml48-82

Key Configuration Details

StepPurposeConfiguration
CheckoutClone repositorypersist-credentials: false for security .github/workflows/integration.yml52
PHP SetupInstall PHPshivammathur/setup-php@2.36.0 with matrix version .github/workflows/integration.yml58-60
Composer InstallInstall dependencies--ignore-platform-req=php+ allows flexible PHP versions .github/workflows/integration.yml65
wp-env SetupConfigure WordPressWP_ENV_CORE: WordPress/WordPress#${{ matrix.wordpress }} .github/workflows/integration.yml76
Problem MatchersAnnotate failuresInline annotations in PR diffs .github/workflows/integration.yml67-71

The workflow sets WP_VERSION as an environment variable .github/workflows/integration.yml34-35 for test configuration, though the tests themselves use wp-env's version control.

Sources: .github/workflows/integration.yml48-82

Code Standards and Linting Workflow

The cs-lint.yml workflow enforces WordPress VIP coding standards and validates PHP/XML syntax across multiple PHP versions.

PHP Version Matrix and Error Handling


The PHP 8.5 job uses continue-on-error: true .github/workflows/cs-lint.yml44 to test against unreleased PHP versions without blocking merges.

Sources: .github/workflows/cs-lint.yml39-44

Code Quality Check Sequence


Sources: .github/workflows/cs-lint.yml46-97

Problem Matcher Integration

The workflow registers three problem matcher types to annotate failures directly in pull request diffs:

MatcherActionPurpose
phplint-problem-matcherkorelstar/phplint-problem-matcher@v1.2.0Inline PHP syntax errors .github/workflows/cs-lint.yml56-57
xmllint-problem-matcherkorelstar/xmllint-problem-matcher@v1.2.0Inline XML validation errors .github/workflows/cs-lint.yml61-62
cs2prTool installed via ComposerConvert PHPCS checkstyle XML to PR annotations .github/workflows/cs-lint.yml52 .github/workflows/cs-lint.yml97

The XMLLINT_INDENT environment variable is set to a tab character .github/workflows/cs-lint.yml37 to match project coding standards.

Sources: .github/workflows/cs-lint.yml36-97

PHPCS Execution Strategy

The PHPCS step uses continue-on-error: true .github/workflows/cs-lint.yml93 to prevent immediate workflow failure, allowing the cs2pr step to process and display all violations. The workflow generates a checkstyle XML report .github/workflows/cs-lint.yml94 which cs2pr parses and converts to GitHub annotations .github/workflows/cs-lint.yml97

Sources: .github/workflows/cs-lint.yml92-97

Automated Dependency Management

Dependabot automatically creates pull requests to update GitHub Actions and Composer dependencies on a weekly schedule.

Dependabot Update Schedule


GitHub Actions Update Configuration


All GitHub Actions updates are grouped into a single PR per week .github/dependabot.yml11-13 with the commit prefix "Actions" .github/dependabot.yml16-18

Sources: .github/dependabot.yml6-19

Composer Dependency Update Configuration


Composer updates use versioning-strategy: increase-if-necessary .github/dependabot.yml42 to avoid unnecessary constraint bumps. All development dependencies matching the defined patterns are grouped into a single weekly PR .github/dependabot.yml26-35

Sources: .github/dependabot.yml21-42

Dependabot Configuration Details

SettingGitHub ActionsComposerPurpose
ScheduleMondayTuesdayStagger updates to avoid conflicts
GroupingAll actions (*) .github/dependabot.yml12-13Dev dependencies only .github/dependabot.yml27-35Reduce PR noise
PR Limit5 .github/dependabot.yml195 .github/dependabot.yml41Prevent overwhelming maintainers
Commit PrefixActions .github/dependabot.yml17Composer .github/dependabot.yml39Clear changelog attribution
Labelsdependencies .github/dependabot.yml14-15dependencies .github/dependabot.yml37-38Automated filtering

Sources: .github/dependabot.yml1-42

Code Review Automation

The CODEOWNERS file configures automatic reviewer assignment for pull requests.

Code Ownership Structure


The wildcard pattern * .github/CODEOWNERS3 matches all files in the repository, ensuring the @Automattic/vip-plugins team is automatically requested as reviewers on every pull request.

Sources: .github/CODEOWNERS1-4

Concurrency Control and Optimization

Both workflows implement concurrency control to optimize CI resource usage and provide faster feedback.

Concurrency Strategy


Concurrency groups use ${{ github.workflow }}-${{ github.ref }} .github/workflows/integration.yml26 to create unique groups per workflow and branch. The cancel-in-progress: true .github/workflows/integration.yml27 setting immediately cancels outdated runs when new commits are pushed.

Sources: .github/workflows/integration.yml24-27 .github/workflows/cs-lint.yml26-29

Path-Based Workflow Filtering

Both workflows only run when relevant files are modified:

File PatternTriggers
.github/workflows/*.ymlWorkflow file changes .github/workflows/integration.yml6 .github/workflows/cs-lint.yml6
**.phpPHP code changes .github/workflows/integration.yml7 .github/workflows/cs-lint.yml7
phpunit.xml.distPHPUnit configuration .github/workflows/integration.yml8 .github/workflows/cs-lint.yml9
composer.jsonDependency changes .github/workflows/integration.yml9 .github/workflows/cs-lint.yml10
.phpcs.xml.distPHPCS configuration (cs-lint only) .github/workflows/cs-lint.yml8

This filtering prevents unnecessary workflow runs for documentation-only changes or other non-code modifications.

Sources: .github/workflows/integration.yml3-18 .github/workflows/cs-lint.yml3-20

Security Configuration

Permissions Model

Both workflows use minimal permissions following the principle of least privilege:


The permissions: contents: read .github/workflows/integration.yml21-22 .github/workflows/cs-lint.yml23-24 restricts workflows to read-only access. The persist-credentials: false .github/workflows/integration.yml52 .github/workflows/cs-lint.yml67 setting in checkout actions prevents accidental credential exposure.

Sources: .github/workflows/integration.yml21-22 .github/workflows/integration.yml50-52 .github/workflows/cs-lint.yml23-24 .github/workflows/cs-lint.yml64-67

Action Version Pinning

All third-party GitHub Actions are pinned to specific commit SHAs for security and reproducibility:

ActionRepositoryPinned SHAVersion
actions/checkoutGitHub officialde0fac2e4500dabe0009e67214ff5f5447ce83ddv6.0.2 .github/workflows/integration.yml50
shivammathur/setup-phpCommunity44454db4f0199b8b9685a5d763dc37cbf79108e12.36.0 .github/workflows/integration.yml58
ramsey/composer-installCommunity3cf229dc2919194e9e36783941438d17239e85203.1.1 .github/workflows/integration.yml63
korelstar/phplint-problem-matcherCommunitycb2b753750ec7bf13a7cde0a476df8c5605bdfb1v1.2.0 .github/workflows/cs-lint.yml57
korelstar/xmllint-problem-matcherCommunity1bd292d642ddf3d369d02aaa8b262834d61198c0v1.2.0 .github/workflows/cs-lint.yml62
ChristophWurst/xmllint-actionCommunity7c54ff113fc0f6d4588a15cb4dfe31b6ecca5212v1.2.1 .github/workflows/cs-lint.yml86

SHA pinning prevents malicious updates to third-party actions from automatically compromising the CI pipeline.

Sources: .github/workflows/integration.yml50 .github/workflows/integration.yml58 .github/workflows/integration.yml63 .github/workflows/cs-lint.yml57 .github/workflows/cs-lint.yml62 .github/workflows/cs-lint.yml86

Workflow Execution Matrix

The following table summarizes all automated jobs and their execution contexts:

WorkflowJob NamePHP VersionsWordPress VersionsTriggerPurpose
integration.ymltest8.2, latest6.6, masterPR, push, manualIntegration tests (single + multisite)
cs-lint.ymlcheckcs8.2, latest, 8.5N/APR, push, manualPHPCS, PHP lint, XML lint
(Dependabot)N/AN/AN/AWeekly (Mon/Tue)Dependency updates

The fail-fast: false setting on both workflows .github/workflows/integration.yml46 .github/workflows/cs-lint.yml42 ensures all matrix combinations complete even if one fails, providing comprehensive test coverage feedback.

Sources: .github/workflows/integration.yml30-82 .github/workflows/cs-lint.yml32-97 .github/dependabot.yml1-42