Skip to content

Tweak: Rearrange CI tests - #226

Merged
KingYes merged 10 commits into
new/request-sourcefrom
tweak/ci-env
Aug 17, 2026
Merged

Tweak: Rearrange CI tests#226
KingYes merged 10 commits into
new/request-sourcefrom
tweak/ci-env

Conversation

@KingYes

@KingYes KingYes commented Aug 13, 2026

Copy link
Copy Markdown
Member

✨ PR Description

1. Problem & Context

Migrate from Grunt-based build/test pipeline to modern npm/Composer workflows with GitHub Actions CI. Enables reliable PHPUnit testing across PHP 7.4–8.3 and WordPress 6.0+ versions.

2. What Changed (Where)

  • CI/CD: Added .github/workflows/phpunit.yml (matrix: PHP 7.4–8.3 × WP 6.0+), php-coding-standards.yml (PHPCS linting), and checkstyle matcher
  • Test infrastructure: New tests/phpunit/bootstrap.php, updated phpunit.xml with proper config, expanded bin/install-wp-tests.sh with version handling
  • Dependencies: composer.json replaces Grunt (phpcs, phpunit, wp-coding-standards) + new ruleset.xml; package.json simplified (rimraf only)
  • Test suite: Added tests/phpunit/test-request-source.php (219 lines) + fixed test-base.php object type assertions (PostPosts)
  • Build artifacts: .build-rsync-exclude, .cursor/rules/, tests/README.md added; .jshintrc removed

3. How It Works

PHPUnit tests run via composer test (entry: phpunit.xmltests/phpunit/bootstrap.php → plugin activation). GitHub Actions matrix spawns 20 job combinations (5 PHP × 4 WP versions) on MySQL 5.7, with SVN fallback for missing WP builds. PHPCS enforces standards via ruleset.xml (security warnings, WordPress conventions). Package script handles binary distribution via rsync/zip.

4. Risks

  • DB_HOST parameter: Now required (line 11, bin/install-wp-tests.sh); existing scripts passing 4 positional args will break—mitigate with documentation
  • WordPress version matrix: Nightly/trunk builds may be unstable; CI conditional skip via commit message helps but test flakiness risk remains
  • Object type constant change: PostPosts in test assertions assumes DB schema consistency; verify against actual aal_insert_log() behavior

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how

@wiz-9a149474ff

wiz-9a149474ff Bot commented Aug 13, 2026

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations 4 Low
SAST Finding SAST Findings -
Software Management Finding Software Management Findings -
Total 4 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio.

@KingYes
KingYes merged commit 954211a into new/request-source Aug 17, 2026
52 checks passed
@KingYes
KingYes deleted the tweak/ci-env branch August 17, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant