Skip to content

test: Add build_and_test reusable workflow #2048

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

Merged
merged 26 commits into from
Apr 29, 2025

Conversation

mathbunnyru
Copy link
Collaborator

@mathbunnyru mathbunnyru commented Apr 27, 2025

Reasons:

  • workflows become simpler
  • no code duplication
  • more difficult to build and not test something
  • no wrong workflow dependencies: before, clang test was waiting for gcc build, which doesn't make sense

I don't want to use steps.conan_export_output.outputs.conan_profile, so mac build is expected to fail on artifact download till we merge #2042

@mathbunnyru mathbunnyru marked this pull request as draft April 27, 2025 11:55
@mathbunnyru mathbunnyru marked this pull request as ready for review April 27, 2025 12:10
@mathbunnyru mathbunnyru changed the title test: Add test reusable workflow test: Add build_and_test reusable workflow Apr 27, 2025
Copy link

codecov bot commented Apr 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.76%. Comparing base (427ba47) to head (c111fed).
Report is 87 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2048      +/-   ##
===========================================
+ Coverage    72.71%   72.76%   +0.05%     
===========================================
  Files          333      355      +22     
  Lines        13525    14697    +1172     
  Branches      6881     7464     +583     
===========================================
+ Hits          9835    10695     +860     
- Misses        1785     1975     +190     
- Partials      1905     2027     +122     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mathbunnyru
Copy link
Collaborator Author

After this change it's much easier to see what has and hasn't been run in GitHub, especially with integration tests.

Before:
Screenshot 2025-04-27 at 13 28 05

After:
Screenshot 2025-04-27 at 13 28 19

@mathbunnyru
Copy link
Collaborator Author

mathbunnyru commented Apr 27, 2025

Now we don't upload unit_tests bin when code coverage is enabled.
if: ${{ inputs.unit_tests && !inputs.code_coverage }}

That's why we build gcc Debug build for code coverage, but don't upload binaries.
This PR won't change this behaviour, but after merging it I'll work on refactoring when and how we:

  • upload artifacts
  • name them
  • run code coverage

@mathbunnyru mathbunnyru reopened this Apr 27, 2025
godexsoft
godexsoft previously approved these changes Apr 28, 2025
Copy link
Collaborator

@godexsoft godexsoft 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 the direction this is going 👍 I saw there is an issue with artifact names in the mac portion (https://github.com/XRPLF/clio/actions/runs/14693922110/job/41233037563). I assume this is fixed or will be fixed in another PR.

@mathbunnyru
Copy link
Collaborator Author

mathbunnyru commented Apr 28, 2025

I like the direction this is going 👍 I saw there is an issue with artifact names in the mac portion (https://github.com/XRPLF/clio/actions/runs/14693922110/job/41233037563). I assume this is fixed or will be fixed in another PR.

Thanks!

Yes, I fixed it in another PR: #2042, merged it to develop, and updated this branch.
This PR should be good to go now and if CI passes, I will merge it 👍

kuznetsss
kuznetsss previously approved these changes Apr 29, 2025
Copy link
Collaborator

@godexsoft godexsoft left a comment

Choose a reason for hiding this comment

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

🚀

@mathbunnyru mathbunnyru merged commit cc1da5a into XRPLF:develop Apr 29, 2025
53 checks passed
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