From 5f656b36679f74be35161656264a37c420c097a9 Mon Sep 17 00:00:00 2001 From: Mathieu Bastian Date: Sun, 20 Sep 2026 12:13:13 +0200 Subject: [PATCH 1/2] Fix CI validation for PRs targeting master master has no plugin modules of its own, so build.yml's build_and_test job hard-fails on scaffold-only PRs (e.g. #338) with "No 'nbm' modules have been detected." It also never ran at all for fork-based PRs, since push events don't fire cross-fork and master had no pull_request trigger. - build.yml: skip build/validate gracefully when pom.xml has no entries instead of failing. - test-generation.yml: add a pull_request trigger for master so PRs (same-repo or fork) get the generation integration test run pre-merge, mirroring master-forge's pr.yml. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/build.yml | 7 ++++++- .github/workflows/test-generation.yml | 8 ++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 215bfabb9..b9b1f6646 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,4 +19,9 @@ jobs: java-version: '17' distribution: 'temurin' - name: Build and validate project - run: mvn -B package --file pom.xml \ No newline at end of file + run: | + if ! grep -q '' pom.xml; then + echo "No plugin modules present in pom.xml; skipping build/validate (see test-generation workflow for scaffold validation)." + exit 0 + fi + mvn -B package --file pom.xml \ No newline at end of file diff --git a/.github/workflows/test-generation.yml b/.github/workflows/test-generation.yml index bb7c55b2a..c1794c069 100644 --- a/.github/workflows/test-generation.yml +++ b/.github/workflows/test-generation.yml @@ -2,11 +2,15 @@ name: test-generation # Integration test for the plugin generation process (gephi-maven-plugin's # generate/validate/build-metadata/create-autoupdate goals). Runs on every -# master commit so a version bump of gephi-maven-plugin in pom.xml is -# regression-tested before real plugin repos pick it up. +# master commit and on PRs targeting master (master has no plugin modules of +# its own, so build.yml's build_and_test can't validate scaffold changes) so +# a version bump of gephi-maven-plugin in pom.xml is regression-tested before +# real plugin repos pick it up. on: push: branches: [ master ] + pull_request: + branches: [ master ] jobs: generation-integration-test: From 18bb6fd54b88490027387dfeb60b3875a6df2b60 Mon Sep 17 00:00:00 2001 From: Mathieu Bastian Date: Sun, 20 Sep 2026 12:16:29 +0200 Subject: [PATCH 2/2] Fix build.yml module check to ignore pom.xml's example comment grep -q '' pom.xml matched the placeholder comment () in the empty block, so the skip never actually triggered. Check for real module directories under modules/ instead. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b9b1f6646..f1f4f852a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,8 +20,8 @@ jobs: distribution: 'temurin' - name: Build and validate project run: | - if ! grep -q '' pom.xml; then - echo "No plugin modules present in pom.xml; skipping build/validate (see test-generation workflow for scaffold validation)." + if [ -z "$(find modules -mindepth 2 -maxdepth 2 -name pom.xml 2>/dev/null)" ]; then + echo "No plugin modules present under modules/; skipping build/validate (see test-generation workflow for scaffold validation)." exit 0 fi mvn -B package --file pom.xml \ No newline at end of file