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

Use caching to run tests and report coverage #5086

Conversation

lspinheiro
Copy link
Collaborator

@lspinheiro lspinheiro commented Jan 16, 2025

Why are these changes needed?

Currently, unit tests are running twice, once in the test step and a second time in code coverage, duplicating resource usage and increasing CI time. This PR updates the build process to always generate the the coverage file during the initial testing and cache it in GitHub Actions artifactions. During the coverage step we just download the files to measure coverage.

Related issue number

Checks

Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.91%. Comparing base (ce20de9) to head (fb5d31c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5086   +/-   ##
=======================================
  Coverage   69.91%   69.91%           
=======================================
  Files         168      168           
  Lines       10698    10698           
=======================================
  Hits         7479     7479           
  Misses       3219     3219           
Flag Coverage Δ
unittests 69.91% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@lspinheiro
Copy link
Collaborator Author

@jackgerrits @ekzhu , I think we are running out of resources in the worker to run tests in parallel. The autogen-ext tests are failing with The hosted runner: GitHub Actions 718 lost communication with the server. Anything in your workflow that terminates the runner process, starves it for CPU/Memory, or blocks its network access can cause this error.. Removing concurrency seems to fix the issue (I updated it to pytest -n 1 in autogen-ext/pyproject.toml in this test).

Copy link
Member

@jackgerrits jackgerrits left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!

@jackgerrits jackgerrits enabled auto-merge (squash) January 17, 2025 14:06
@jackgerrits jackgerrits merged commit a1fdbd9 into microsoft:main Jan 17, 2025
61 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