Build: migrate CI from Travis to GitHub Actions#43
Closed
dd32 wants to merge 10 commits into
Closed
Conversation
Add PHPUnit matrix (PHP 7.4–8.5 against WordPress trunk, MariaDB 11 service) and a lint workflow covering PHPCS, ESLint, and checktextdomain. PHP 8.5 is flagged experimental and allowed to fail. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bbp_format_user_display_name() now prefers wp_is_valid_utf8() (WP 6.9+) and mb_check_encoding() ahead of the seems_utf8() fallback, so on modern environments the deprecated function is never called. The expectation became stale after r7393. Also pin lint workflow to PHP 8.4. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
WPCS 3.0+ raises ShortPrefixPassed for prefixes under 4 chars. "bbp" is the deliberately chosen project prefix, so suppress the sub-sniff via severity=0 instead of excluding a single file. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Splits the multi-line unserialize() and hash_equals() calls added in r7461 across one argument per line so WPCS' multi-line function-call rules are satisfied; also drops two stray trailing spaces. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PHPCS now writes a full text report to the job log alongside the checkstyle output cs2pr converts into PR annotations, so file/line context is visible directly in the workflow output. On pull_request events the scan is limited to changed PHP files; pushes still scan the full tree. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sets ignore_warnings_on_exit=1 so warnings (e.g. notices about deprecated WP functions still used as fallbacks) keep appearing in reports but no longer flip the exit code to 1. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
GitHub is removing Node 20 from runners in September 2026; pin the ESLint/grunt job to Node 24 so it stays on a supported runtime. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Bumps actions/checkout@v4 to v6, actions/setup-node@v4 to v6, and actions/cache@v4 to v5. These majors run on Node.js 24 internally, clearing the deprecation warnings that v4 was triggering ahead of GitHub removing Node.js 20 from runners. shivammathur/setup-php remains on v2 (still the actively maintained major). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
node-sass has no prebuilt binary for Node 24 and its build-from-source fallback fails too, blocking npm ci before ESLint or checktextdomain get a chance to run. The lint job doesn't compile sass, so installing with --ignore-scripts gets the eslint/grunt binaries into place without the broken postinstall. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
node-sass is unmaintained and ships no prebuilt binary for Node 24, breaking npm ci on a modern toolchain. Switch the grunt-sass implementation to the official dart-sass package and regenerate the lockfile; also drop the temporary --ignore-scripts workaround from the lint workflow now that the install is clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
renatonascalves
approved these changes
May 20, 2026
There was a problem hiding this comment.
code looks good. I don't have access to set up github actions here but @JJJ probably do.
|
@dd32 I think you need a ticket too. Just noticed it's missing. |
JJJ
approved these changes
May 20, 2026
Contributor
|
Exported the .diff, manually committed to trunk in: https://bbpress.trac.wordpress.org/changeset/7407 |
dd32
pushed a commit
that referenced
this pull request
May 20, 2026
Replaces the legacy `.travis.yml` with two GitHub Actions workflows, and fixes a small handful of issues uncovered along the way. In trunk, for 2.7. Props dd32. Fixes: #43 git-svn-id: https://bbpress.svn.wordpress.org/trunk@7407 9866e705-20ec-0310-96e7-cbb4277adcfb
dd32
pushed a commit
that referenced
this pull request
May 20, 2026
…ime()` float. Fixes the PHP 8.1+ `Implicit conversion from float to int loses precision` deprecation notice, emitted every time the Akismet history metabox renders for a topic or reply. In trunk, for 2.7. Props dd32. Fixes: #3671. From: #43 git-svn-id: https://bbpress.svn.wordpress.org/trunk@7408 9866e705-20ec-0310-96e7-cbb4277adcfb
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Replaces the legacy
.travis.ymlwith two GitHub Actions workflows and fixes a small handful of issues uncovered along the way..github/workflows/test.yml— PHPUnittrunkcontinue-on-error) so it surfaces results without gatingwordpress-develop/src/wp-content/plugins/bbpress/soWP_DEVELOP_DIRresolves the waytests/phpunit/includes/define-constants.phpexpectsphpunit.xml.distalready excludes thebuddypressgroup.github/workflows/lint.yml— PHPCS + JSphpcsjob on PHP 8.4 withcs2pr-driven PR annotations and a full text report in the logpull_requestevents only changed PHP files are scanned (git diff base.sha HEAD -- '*.php'); pushes still scan the full treejs-lintjob runs ESLint +checktextdomainon Node 24Test/code/config fixes uncovered by the new CI
setExpectedDeprecated( 'seems_utf8' )from three author-template tests — after r7393 (bbp_format_user_display_name()preferringwp_is_valid_utf8()when available) the deprecation path is unreachable on modern WP, so the expectation never firesphpcs.xml.dist: explicitly acceptbbpas the project prefix (WPCS 3.0+ raisesShortPrefixPassedfor prefixes under 4 chars) and setignore_warnings_on_exit=1so warnings keep showing up in reports without flipping the exit codeunserialize()and 2hash_equals()calls added in r7461 so they pass WPCS multi-line function-call rulesnode-sass(unmaintained, no Node 24 prebuilt binary) with the officialsass(dart-sass) package, updatingGruntfile.jsand regeneratingpackage-lock.jsonCI infrastructure
actions/checkout@v6,actions/setup-node@v6,actions/cache@v5. These run on Node.js 24 internally, clearing the Node 20 deprecation warnings GitHub is enforcing in June 2026.shivammathur/setup-php@v2remains on its active major.Test plan
Tests: 662, Assertions: 1107, Incomplete: 374)npm installclean on Node 24 with dart-sassgrunt sass:colorsstill compiles the admin color schemes (emits@importdeprecation warnings from dart-sass — future cleanup, not a regression)🤖 Generated with Claude Code