Skip to content

Modernize CI with Dependabot, GitHub Actions, and Maven wrapper#105

Merged
mercyblitz merged 5 commits intomicrosphere-projects:dev-1.xfrom
mercyblitz:dev-1.x
Mar 27, 2026
Merged

Modernize CI with Dependabot, GitHub Actions, and Maven wrapper#105
mercyblitz merged 5 commits intomicrosphere-projects:dev-1.xfrom
mercyblitz:dev-1.x

Conversation

@mercyblitz
Copy link
Copy Markdown
Contributor

This pull request makes several improvements to the project's build and release automation, updates documentation and example usage in core classes, and upgrades Maven-related configuration. The key changes are grouped below.

Build and Release Automation Improvements:

  • Added a .github/dependabot.yml configuration to enable daily Maven dependency update checks via Dependabot.
  • Upgraded GitHub Actions in workflow files to use the latest major versions (actions/checkout@v5, actions/setup-java@v5), switched Maven build to use the Maven Wrapper (./mvnw), and added a step to ensure the wrapper script is executable.
  • Enhanced the Maven publish workflow to validate version input, added a release job that creates tags and GitHub releases, and automatically bumps the patch version after publishing. [1] [2]

Maven Wrapper and Repository Updates:

  • Updated maven-wrapper.properties to use Maven 3.9.9, set the wrapper version to 3.3.4, changed the distribution type to only-script, and switched the Maven distribution URL to use Aliyun's mirror for improved reliability in some regions.

Documentation and Example Usage Improvements:

  • Expanded and clarified Javadoc comments and example usage in core classes such as ReactiveDiscoveryClientAdapter, UnionDiscoveryClient, DiscoveryClientAutoConfiguration, ReactiveDiscoveryClientAutoConfiguration, InMemoryServiceRegistry, and MultipleAutoServiceRegistration to make the APIs easier to understand and use. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]

Dependency and Metadata Clarification:

  • Clarified a dependency comment in microsphere-spring-cloud-commons/pom.xml to indicate that the dependency is for testing purposes.

Add Dependabot config and modernize CI/build tooling: update GitHub Actions to use checkout@v5 and setup-java@v5, switch build steps to use ./mvnw, and enhance maven-publish with input validation, a release job (tag/release creation and next-patch bump). Add mvnw and mvnw.cmd, upgrade maven wrapper to 3.3.4 and point distribution to an Aliyun mirror. Also apply widespread JavaDoc/comment improvements and minor pom adjustments across service registry and discovery modules, and remove redundant test logback resources.
Ensure the Maven wrapper is executable before invoking it in the GitHub Actions job to avoid permission errors on runners where the execute bit may not be preserved. Adds `chmod +x mvnw` prior to running `./mvnw --batch-mode --update-snapshots --file pom.xml`.
Add a dedicated step to chmod +x mvnw before the build and remove the redundant chmod from the 'Build with Maven' step. This ensures the Maven wrapper is executable on the runner and keeps the build step focused on running ./mvnw with the existing flags.
Delete the unit test file FeignClientSpecificationPostProcessorTest from microsphere-spring-cloud-openfeign. The removed test covered injection of AUTO_REFRESH_CAPABILITY_CLASS into FeignClientSpecification; the file has been removed from the test suite (deleted at src/test/java/io/microsphere/spring/cloud/openfeign/autoconfigure/FeignClientSpecificationPostProcessorTest.java).
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ Complexity Δ
...ient/discovery/ReactiveDiscoveryClientAdapter.java 100.00% <ø> (ø) 9.00 <0.00> (ø)
...g/cloud/client/discovery/UnionDiscoveryClient.java 100.00% <ø> (ø) 17.00 <0.00> (ø)
...utoconfigure/DiscoveryClientAutoConfiguration.java 100.00% <ø> (ø) 1.00 <0.00> (ø)
...gure/ReactiveDiscoveryClientAutoConfiguration.java 100.00% <ø> (ø) 1.00 <0.00> (ø)
...ient/service/registry/InMemoryServiceRegistry.java 100.00% <ø> (ø) 10.00 <0.00> (ø)
...vice/registry/MultipleAutoServiceRegistration.java 100.00% <ø> (ø) 5.00 <0.00> (ø)
.../client/service/registry/MultipleRegistration.java 100.00% <ø> (ø) 16.00 <0.00> (ø)
...ient/service/registry/MultipleServiceRegistry.java 100.00% <ø> (ø) 14.00 <0.00> (ø)
.../client/service/registry/RegistrationMetaData.java 100.00% <ø> (+3.84%) 24.00 <0.00> (+1.00)
...ervice/registry/SimpleAutoServiceRegistration.java 100.00% <ø> (ø) 5.00 <0.00> (ø)
... and 25 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Refactor: pull the trace logging into a static helper method log(Class<?>[], Class<?>[]) and invoke it from the post-processor. This makes the logging logic reusable and easier to test. Add FeignClientSpecificationPostProcessorTest that calls the new log method (with LoggingLevelsTest configured) to ensure the logging path is exercised. No functional behavior change.
@sonarqubecloud
Copy link
Copy Markdown

@mercyblitz mercyblitz merged commit 726c1d6 into microsphere-projects:dev-1.x Mar 27, 2026
17 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