-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Cdi2/Jakarta Cdi] Run tests for OpenWebBeans and Weld in CI #2251
Conversation
Codecov Report
@@ Coverage Diff @@
## cdi2-weld #2251 +/- ##
============================================
Coverage 83.02% 83.02%
Complexity 2340 2340
============================================
Files 307 307
Lines 8319 8319
Branches 768 768
============================================
Hits 6907 6907
Misses 1110 1110
Partials 302 302 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this. But I don't like that it breaks in an IDE. I would like the project to keep working by default without clicking options.
So what if cdi2-openwebbeans
is active by default and cdi2-all-implementations
is active in CI? We know a test is running in CI when the CI
environment variable is true.
https://docs.github.com/en/actions/reference/environment-variables
I've done that and for jakarta-cdi as well, just checked the build logs and it worked, the profile was activated. If you want to test locally:
In eclipse the tests pass with openwebbeans |
d765d15
to
b11c97d
Compare
a24bb1b
to
87b4859
Compare
Much appreciated! |
@mpkorstanje this is an alternate maven configuration that lets you run the tests with both openwebbeans and weld.
It is also possible to enable just one implmentation with the profiles
cdi2-openwebbeans
andcdi2-weld
like before.The only issue is that the default profile will break the tests in the IDE.
I use eclipse and to be able to run unit tests I have to activate the
cdi2-openwebbeans
orcdi2-weld
profile in the project configuration.I let you judge if you like it.