From 9072a95f3ed76912d9f3a066ffac51c33c01474e Mon Sep 17 00:00:00 2001 From: "vivi-the-going-merry[bot]" <308115520+vivi-the-going-merry[bot]@users.noreply.github.com> Date: Thu, 17 Sep 2026 11:20:13 -0600 Subject: [PATCH 1/3] Add a trunk job to the PHPUnit matrix, fix test_front_head for WP 7.0 WP core's own wp_maybe_inline_styles() (unrelated to anything Formidable enqueues) can flag a core stylesheet's dist asset as unreadable whenever the WP checkout under test doesn't have its built dist/ files on disk - a property of the checkout (a released branch ships them pre-built; an unbuilt trunk checkout doesn't), not the WP version itself. Discard the notice if it's caught rather than requiring it to fire, so the same test passes whether or not this environment hits it. Added trunk alongside the existing 6.9 pin rather than replacing it, so this can be dropped once WP 7.0 actually ships and 6.9 is no longer the oldest supported version worth testing. --- .github/workflows/phpunit.yml | 3 +++ tests/phpunit/styles/test_FrmStylesController.php | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 367ae8c4a5..fa99caec42 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -30,6 +30,9 @@ jobs: - php: 8.0 wordpress: 6.9 multisite: 0 + - php: 8.0 + wordpress: trunk + multisite: 0 name: PHP ${{ matrix.php }} tests in WP ${{ matrix.wordpress }} steps: diff --git a/tests/phpunit/styles/test_FrmStylesController.php b/tests/phpunit/styles/test_FrmStylesController.php index d4061d4bdb..e5697569a0 100644 --- a/tests/phpunit/styles/test_FrmStylesController.php +++ b/tests/phpunit/styles/test_FrmStylesController.php @@ -22,6 +22,15 @@ public function test_front_head() { ob_start(); wp_head(); $styles = ob_get_clean(); + + // wp_maybe_inline_styles() (WP core, unrelated to anything Formidable enqueues) + // flags a core stylesheet's dist asset as unreadable whenever this environment's + // WP checkout doesn't have its built dist/ files on disk - a property of the + // checkout, not the WP version under test, so a released-branch job may never + // see it while an unbuilt trunk checkout always does. Discard it either way + // rather than requiring it to fire. + unset( $this->caught_doing_it_wrong['wp_maybe_inline_styles'] ); + $this->assertNotEmpty( $styles ); $frm_settings = FrmAppHelper::get_settings(); From ed8a6c02ce1924d8b717f07951a1d92470a19f0e Mon Sep 17 00:00:00 2001 From: "vivi-the-going-merry[bot]" <308115520+vivi-the-going-merry[bot]@users.noreply.github.com> Date: Thu, 17 Sep 2026 11:31:05 -0600 Subject: [PATCH 2/3] Build WP core dist assets for the trunk leg, report all legs on failure The first trunk run exposed a second, unrelated pre-existing incompatibility: test_FrmFormTemplatesController::test_enqueue_assets errored on a missing wp-admin/css/view-transitions.min.css, since a raw trunk checkout has no built dist/minified assets (a release branch ships them pre-built). Same root cause as the test_front_head fix, different core code path - rather than patching every test that happens to touch a core enqueue path one-by-one, build the missing assets in the trunk leg itself, the same way WordPress core's own CI does before running its PHPUnit suite. Also added fail-fast: false - the first trunk failure cancelled both 6.9 jobs before they reported their own result, so there was no actual confirmation the fix didn't affect them. --- .github/workflows/phpunit.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index fa99caec42..0747a0ce14 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -22,6 +22,10 @@ jobs: env: WP_MULTISITE: ${{ matrix.multisite }} strategy: + # Report every matrix leg's own result rather than the default fail-fast + # cancelling the others as soon as one fails - same reasoning as cypress.yml's + # `fail-fast: false`. + fail-fast: false matrix: include: - php: 7.4 @@ -56,6 +60,22 @@ jobs: sed -i "s/youremptytestdbnamehere/wordpress_tests/" wp-tests-config.php sed -i "s/yourusernamehere/root/" wp-tests-config.php sed -i "s/yourpasswordhere/root/" wp-tests-config.php + + # A release branch (e.g. 6.9) ships pre-built dist/minified assets under `src/`; + # a raw `trunk` checkout doesn't, so it hits unrelated core code paths that + # expect them to already exist (wp_maybe_inline_styles's dist stylesheet check, + # wp-admin CSS minification for e.g. view-transitions.min.css). Build them the + # same way core's own CI does (reusable-build-package.yml: npm ci && npm run + # build), but with the `:dev` variant so the output lands in `src/` (Gruntfile's + # WORKING_DIR under `--dev`) where WP_DEVELOP_DIR points, instead of the plain + # build's separate `build/` package directory. + - name: Build WP core assets (trunk only - release branches ship these pre-built) + if: matrix.wordpress == 'trunk' + timeout-minutes: 5 + run: | + cd /tmp/wordpress + npm ci + npm run build:dev - name: Creating database run: | sudo /etc/init.d/mysql start From d5f0002bd6c2804c9cb7d799e79de2dd10abf13c Mon Sep 17 00:00:00 2001 From: "vivi-the-going-merry[bot]" <308115520+vivi-the-going-merry[bot]@users.noreply.github.com> Date: Thu, 17 Sep 2026 11:34:07 -0600 Subject: [PATCH 3/3] Pin Node to WP core's own .nvmrc for the trunk asset build The runner's default Node (22.23.2) is older than trunk's own engines.node requirement (>=24.18.0 as of this writing) - npm ci refused to run at all (EBADENGINE). Read the version from the checkout's own .nvmrc instead of assuming the runner default, since this requirement moves with trunk. --- .github/workflows/phpunit.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 0747a0ce14..af1857e0b6 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -69,6 +69,17 @@ jobs: # build), but with the `:dev` variant so the output lands in `src/` (Gruntfile's # WORKING_DIR under `--dev`) where WP_DEVELOP_DIR points, instead of the plain # build's separate `build/` package directory. + # + # Node version comes from the WP core checkout's own `.nvmrc`, not this + # runner's default - core's `engines.node` requirement moves with trunk and the + # runner default (Node 22 as of this writing) already trails it (WordPress#7.2.0 + # requires >=24.18.0). + - name: Set up Node for WP core's build (trunk only) + if: matrix.wordpress == 'trunk' + uses: actions/setup-node@v4 + with: + node-version-file: /tmp/wordpress/.nvmrc + - name: Build WP core assets (trunk only - release branches ship these pre-built) if: matrix.wordpress == 'trunk' timeout-minutes: 5