Skip to content
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

Merged
merged 5 commits into from
Mar 6, 2021

Conversation

dcendents
Copy link
Contributor

@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 and cdi2-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 or cdi2-weld profile in the project configuration.

I let you judge if you like it.

@dcendents dcendents requested a review from mpkorstanje March 2, 2021 21:17
@codecov
Copy link

codecov bot commented Mar 2, 2021

Codecov Report

Merging #2251 (87b4859) into cdi2-weld (da701f8) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@             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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update da701f8...87b4859. Read the comment docs.

Copy link
Contributor

@mpkorstanje mpkorstanje left a 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

@dcendents
Copy link
Contributor Author

dcendents commented Mar 3, 2021

So what if cdi2-openwebbeans is active by default and cdi2-all-implementations is active in CI?

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:

  • mvn help:active-profiles
  • CI=true mvn help:active-profiles

In eclipse the tests pass with openwebbeans

@dcendents dcendents force-pushed the cdi2-weld-all-impls branch from d765d15 to b11c97d Compare March 3, 2021 16:05
@dcendents dcendents force-pushed the cdi2-weld-all-impls branch from a24bb1b to 87b4859 Compare March 3, 2021 16:43
@mpkorstanje mpkorstanje changed the title run both tests for openwebbeans and weld by default [Cdi2/Jakarta Cdi] Run tests for openwebbeans and weld in CI Mar 6, 2021
@mpkorstanje mpkorstanje changed the title [Cdi2/Jakarta Cdi] Run tests for openwebbeans and weld in CI [Cdi2/Jakarta Cdi] Run tests for OpenWebBeans and Weld in CI Mar 6, 2021
@mpkorstanje mpkorstanje merged commit 3e9b424 into cdi2-weld Mar 6, 2021
@mpkorstanje mpkorstanje deleted the cdi2-weld-all-impls branch March 6, 2021 11:15
@mpkorstanje
Copy link
Contributor

Much appreciated!

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