Skip to content

Fail build when unittests fail for PRs#60

Merged
BertScholten merged 4 commits intoaerius:mainfrom
BertScholten:fail_pr_build_when_tests_fail
Mar 24, 2026
Merged

Fail build when unittests fail for PRs#60
BertScholten merged 4 commits intoaerius:mainfrom
BertScholten:fail_pr_build_when_tests_fail

Conversation

@BertScholten
Copy link
Copy Markdown
Member

Be more strict on failing tests for PRs, to avoid missing a failing test before merging.

@BertScholten BertScholten requested review from Hilbrand and SerhatG April 7, 2025 10:12
Copy link
Copy Markdown
Member

@Hilbrand Hilbrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BertScholten BertScholten force-pushed the fail_pr_build_when_tests_fail branch from 49ad3b6 to 068ce32 Compare April 7, 2025 10:16
@BertScholten BertScholten requested a review from Hilbrand April 7, 2025 10:30
@BertScholten
Copy link
Copy Markdown
Member Author

Apparantly the service modules were never tested with PR builds. Not sure if this is the correct change (I think putting the service jars in Nexus makes sense, but there might be other reasons why this shouldn't be done?), or if we should change the action to not use publish as profile.

@SerhatG
Copy link
Copy Markdown
Member

SerhatG commented Apr 8, 2025

The reasoning was that only the client parts are used by other projects. The service parts are never used by others.
What we might do is make a two step approach. Do unittests on everything, but only push the client parts.

As a little bonus this also allows us to do the Docker part before the Maven Publish part, so that if the Docker images fail to build, it won't have pushed the client libraries.

@SerhatG
Copy link
Copy Markdown
Member

SerhatG commented Mar 13, 2026

Bump.. Should we merge as is or fix it?

@BertScholten
Copy link
Copy Markdown
Member Author

Let's fix it properly.

2 step approach sounds correct, I think we'd want to use a different maven profile for PR builds than publish to ensure everything is build. And if required, publish should then only specify those we want uploaded. I'll have a go at changing this.

@BertScholten BertScholten force-pushed the fail_pr_build_when_tests_fail branch 2 times, most recently from 5f5fa71 to 8bf9908 Compare March 18, 2026 14:46
Not sure what the idea was behind not publishing the service and its dependencies, but it's causing the code not to be compiled/tested when building the PR. And these should be published to nexus anyway I think?
it was removed with f17cdc8, which seemed a bit weird? Assume it was just supposed to remove just the docker build part.
Also not specifying a profile, as search does not have a 'deploy' profile anyway.
@BertScholten BertScholten force-pushed the fail_pr_build_when_tests_fail branch from 8bf9908 to 50902d0 Compare March 20, 2026 15:39
Jenkins already builds on PR, no real need to do it twice. Though jenkins isn't publicly reachable, so not as transparent for people outside AERIUS, it's also not like we had people outside contributing.
@sonarqubecloud
Copy link
Copy Markdown

@BertScholten BertScholten merged commit 7281a0d into aerius:main Mar 24, 2026
2 checks passed
@BertScholten BertScholten deleted the fail_pr_build_when_tests_fail branch March 24, 2026 09:00
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.

3 participants