Skip to content

chore: improve ci pipeline#5336

Open
SteKoe wants to merge 5 commits intomasterfrom
chore/ci
Open

chore: improve ci pipeline#5336
SteKoe wants to merge 5 commits intomasterfrom
chore/ci

Conversation

@SteKoe
Copy link
Copy Markdown
Contributor

@SteKoe SteKoe commented May 5, 2026

This pull request introduces several improvements to the build, test, and release workflows, with a focus on speeding up CI feedback, improving parallelization, and clarifying documentation. The main changes include enabling parallel Maven builds, refining test and integration test execution, updating workflow concurrency controls, and optimizing Node setup and caching. Additionally, documentation is updated to reflect these changes and clarify build instructions.

CI/CD Workflow Improvements:

  • Enabled parallel Maven builds (-T 1C) in all GitHub Actions workflows for faster builds and deployments, and clarified when coverage is collected. [1] [2] [3] [4] [5]
  • Added concurrency groups to all workflows to prevent duplicate runs and reduce wasted CI resources; documentation and release deploys are not cancelled mid-run. [1] [2] [3] [4]
  • Removed unnecessary disk space freeing steps from workflows to simplify and speed up job startup. [1] [2] [3]

Testing and Build Configuration:

  • Updated Maven Surefire and Failsafe plugin configurations in pom.xml to:
    • Parallelize test execution with up to 4 threads per core.
    • Clearly separate unit tests and integration tests by pattern.
    • Exclude abstract classes and integration tests from unit test runs.
  • Updated test environment for frontend unit tests to use happy-dom (faster than jsdom) and set a worker limit for parallel test execution.
  • Added explicit @vitest-environment jsdom annotation to individual test files where needed.

Documentation Updates:

  • Updated .github/copilot-instructions.md to use -Dmaven.test.skip=true consistently (instead of -DskipTests) for all build commands, improving clarity and consistency. [1] [2]

Node.js Setup Improvements:

  • Standardized Node.js setup in workflows using actions/setup-node with caching, replacing manual cache steps for reliability and simplicity.

These changes collectively improve CI speed, reliability, and maintainability, and make the build/test process more transparent for contributors.

@SteKoe SteKoe requested a review from a team as a code owner May 5, 2026 18:58
@SteKoe SteKoe enabled auto-merge (squash) May 5, 2026 18:59
@SteKoe SteKoe disabled auto-merge May 5, 2026 19:09
@SteKoe SteKoe enabled auto-merge (squash) May 5, 2026 19:09
@SteKoe SteKoe disabled auto-merge May 5, 2026 19:11
@cdprete
Copy link
Copy Markdown
Contributor

cdprete commented May 5, 2026

Have a look at https://docs.junit.org/6.0.3/writing-tests/parallel-execution.html as well.
Rather then mangling with Maven, you can let JUnit take care of it ;)

Also, consider renaming the integration tests to *IT and let failsafe (it's actually meant to be used for integration tests instead of surefire for proper external resources management and to really test against the built artifact) run them, in parallel with the unit tests from surefire, instead.

Comment thread .github/workflows/build-main.yml Outdated
Comment thread .github/workflows/build-main.yml Outdated
@cdprete
Copy link
Copy Markdown
Contributor

cdprete commented May 5, 2026

@SteKoe if you don't mind, I added some suggestions ;)

@cdprete
Copy link
Copy Markdown
Contributor

cdprete commented May 6, 2026

Hi @SteKoe.

I don't know if you realized it, but there is

Warning: Some problems were encountered while building the effective model for de.codecentric:spring-boot-admin:pom:4.1.0-SNAPSHOT
Warning: 'build.pluginManagement.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-failsafe-plugin @ de.codecentric:spring-boot-admin:${revision}, /home/runner/work/spring-boot-admin/spring-boot-admin/pom.xml, line 381, column 25

in the logs.

@SteKoe
Copy link
Copy Markdown
Contributor Author

SteKoe commented May 7, 2026

Hey @cdprete,

thanks for your comments, findings and your involvement in this open source project. It is very much appreciated! I haven't looked in the logs of the new build in depth, yet, and I will have to discuss the approach with my colleagues as well.

Have a look at https://docs.junit.org/6.0.3/writing-tests/parallel-execution.html as well.
Rather then mangling with Maven, you can let JUnit take care of it ;)

Parallel execution of unit tests seems a little bit tricky in our project due to a lot of common Abstract*Test classes which led to some issues in the past, already.

So, thanks again, we are on it :) Slowly, but gradually.

@cdprete
Copy link
Copy Markdown
Contributor

cdprete commented May 7, 2026

Abstract*Test classes which led to some issues in the past, already.

They should be "ignored" - only the children concrete classes should run - if those classes are indeed abstract.
If they are concrete classes, then it's to be expected.

thanks for your comments, findings and your involvement in this open source project.

I find the project valuable and I appreciate a lot that you guys are doing this for free, so I'm more than happy to contribute when I can.
I feel sorry I can't contribute as much as I would like to the frontend, but I'm slowly teaching myself Vue for this.

cdprete

This comment was marked as off-topic.

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.

2 participants