Skip to content

Run the SPI contract tests in master-forge's CI - #376

Merged
mbastian merged 4 commits into
master-forgefrom
update/master-forge-contract-tests
Nov 8, 2026
Merged

mbastian merged 4 commits into
master-forgefrom
update/master-forge-contract-tests

Conversation

@mbastian

@mbastian mbastian commented Nov 8, 2026

Copy link
Copy Markdown
Member

Merges master into master-forge to bring the contract-test harness (#354, #375) here. master-forge is already on Gephi 0.11.4 (#373), which the tests need.

  • .github/contract-tests/: the harness, running gephi-plugins-tests 1.2.0 against each plugin module, one Maven run per module so a failure names one plugin.
  • pr.yml: tests the modules a PR changes (all of them when the root pom.xml or the harness change). It existed on both sides, I took master's copy (add/add conflict). A failing check fails the PR; warnings (advisory checks) show as annotations and in the job summary.
  • build.yml, test-generation.yml, docs: as in master.
  • Nothing under modules/.

The root pom.xml change of this merge is empty: master-forge already has the 0.11.4 upgrade from #373.

This PR is the first run of the new pr.yml, and it changes the harness, so it tests every module. Expected: all pass (the sweep of all 59 NBM modules at 0.11.4 passed locally), with 19 warnings across 12 plugins. The one thing it can't reproduce locally is Neo4jPlugin's own unit test, which needs Docker (the GitHub runners have it, see #359).

🤖 Generated with Claude Code

mbastian and others added 4 commits November 7, 2026 17:21
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Upgrade to Gephi 0.11.4 and gephi-maven-plugin 1.4.1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Run gephi-plugins-tests SPI contract tests in CI

Adds a standalone harness (.github/contract-tests) that runs gephi-plugins-tests' contract tests against installed plugin modules, without plugins or gephi-plugin-parent having to declare anything. build.yml tests every module of the branch, pr.yml (moved here from master-forge) tests the modules a master-forge PR changes, and test-generation.yml checks the harness still resolves for the current gephi.version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Pin Surefire 3.6.1 in the contract-test harness and keep docs SPI-agnostic

gephi-plugins-tests will cover more SPIs than layouts, so the docs describe the contract tests generically instead of naming LayoutContractTest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Harden the SPI contract-test harness

- pr.yml tests every module when the root pom.xml or the harness changes, and passes changed folders as a quoted array (no word splitting, no path quoting)
- run.sh fails loudly when listing the reactor fails or gephi.version can't be read, warns about folders that aren't reactor modules, refuses to test a module that isn't installed or was rebuilt since its install, and fails if no contract test class ran at all
- the harness only tests implementations from the plugin's own jar (gephi.plugins.tests.jar, honored by gephi-plugins-tests 1.1.0) and runs headless with the module access Gephi's launcher grants
- test-generation.yml adds a positive control against core layout-plugin so a harness that silently tests nothing fails
- build.yml skips the contract-test step on branches without plugin modules

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Use gephi-plugins-tests 1.1.0 in the contract-test harness

1.1.0 only tests the implementations from the plugin's own jar (the
harness already passes gephi.plugins.tests.jar), and adds the Statistics
and Layout lifecycle contract tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Checks that only warn (a layout adding nodes, a statistics without a user interface...) don't fail the run: run.sh turns the warnings the tests write to contract-warnings.tsv into ::warning:: annotations and, on GitHub Actions, a table in the job summary. The jars of the modules that depend on the tested one are put on the test classpath, so a plugin whose user interface is in another module (e.g. BoundingDiameters) has it found.

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Brings the contract-test harness of master (#354, #375) to master-forge: the .github/contract-tests harness running gephi-plugins-tests 1.2.0, and the workflows that use it. pr.yml existed on both sides, take master's copy, which also runs the contract tests on the modules a PR changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@mbastian
mbastian merged commit 82eff59 into master-forge Nov 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant