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

Add matrix for testing #111

Merged
merged 11 commits into from
Feb 25, 2024
Merged

Conversation

cre8
Copy link
Contributor

@cre8 cre8 commented Feb 25, 2024

adding the matrix testing approach allows us to test it for different versions

Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
@cre8 cre8 marked this pull request as draft February 25, 2024 19:45
@cre8
Copy link
Contributor Author

cre8 commented Feb 25, 2024

@lukasjhan you are correct, it seems that version 18 is and lower is not supported. At this point we have to decide:

  • should the crypto-node package include native support with a higher version number
  • should it be able to use them with lower support but with the help of external libraries

I haven't looked if we can implement the whole crypto-node stuff without the subtle. Code reusage is not possible then, but on the other hand the amount of functions is small that need to be implemented

Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
Copy link

codecov bot commented Feb 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.96%. Comparing base (63256a4) to head (7d96625).

Additional details and impacted files
@@            Coverage Diff             @@
##             next     #111      +/-   ##
==========================================
- Coverage   94.96%   94.96%   -0.01%     
==========================================
  Files          21       21              
  Lines        1530     1529       -1     
  Branches      235      235              
==========================================
- Hits         1453     1452       -1     
  Misses         72       72              
  Partials        5        5              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cre8
Copy link
Contributor Author

cre8 commented Feb 25, 2024

So the good news is that the node code is working fine in nodejs v16 18 and 20 :)

But I needed to outcomment the browser test since these tests seem not to be performed as a browser test, but a node test and therefore the tests failed since node subtle is not supported with all requirements.

We should try to find a solution for the browser tests to get them up and running again before merging this

Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
@cre8
Copy link
Contributor Author

cre8 commented Feb 25, 2024

Found a good solution:
according to this issue jsdom is not supporting webcrypto, therefore the tests fail for node 16 and 18. For some reasons it's possible to call it in node 20, so I added a condition that the browser tests are only run in the matrix test when it's executed with at least 20.
Since we are only using the coverage of v20, we get the full coverage support for this. Since we do not have any version specific conditions like "only run this code when you are using v16, otherwise use this".

So we can also make sure the whole code base is running on node 16. I didn't check lower since from my point of view supporting 3 LTS versions should be enough.

@cre8 cre8 marked this pull request as ready for review February 25, 2024 21:19
@cre8 cre8 merged commit e105ef2 into openwallet-foundation-labs:next Feb 25, 2024
10 checks passed
@cre8 cre8 deleted the fix/matrix-test branch February 25, 2024 21:20
@lukasjhan
Copy link
Member

lukasjhan commented Feb 26, 2024

3 LTS looks good :)

cre8 added a commit to cre8/sd-jwt-js that referenced this pull request Mar 8, 2024
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
cre8 added a commit that referenced this pull request Mar 8, 2024
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
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