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

Cache dependencies in Github Action (#1027) #1028

Merged
merged 2 commits into from
Mar 19, 2024

Conversation

Baschdl
Copy link
Contributor

@Baschdl Baschdl commented Mar 19, 2024

With this change, Github Action will look for a cached dependency installation based on the same pyproject.toml, load it from its cache and not need to install it again. This should make all CI tests run faster.

Checklist

  • I have read and understood the contribution
    guidelines
  • I agree with re-licensing my contribution from AGPLv3 to Apache-2.0.
  • I rebased on main (or there are no conflicts with main)

Copy link

codecov bot commented Mar 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.37%. Comparing base (4c2f71e) to head (614c33e).
Report is 9 commits behind head on main.

❗ Current head 614c33e differs from pull request most recent head deac205. Consider uploading reports for the commit deac205 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1028   +/-   ##
=======================================
  Coverage   76.37%   76.37%           
=======================================
  Files          84       84           
  Lines        6507     6507           
=======================================
  Hits         4970     4970           
  Misses       1537     1537           
Flag Coverage Δ
unittests 76.37% <ø> (ø)

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.

@janfb janfb requested review from tomMoral and janfb March 19, 2024 13:54
Copy link
Contributor

@janfb janfb left a comment

Choose a reason for hiding this comment

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

I think that's a great way to make the CI run faster. But I would like to get @tomMoral feedback as well.

@Baschdl
Copy link
Contributor Author

Baschdl commented Mar 19, 2024

Caching was successful in https://github.com/sbi-dev/sbi/actions/runs/8343959002/job/22835278231. It's about 380 MB it will now download from Github's Cache server in each CI run, should take 2sec.

Copy link
Contributor

@tomMoral tomMoral left a comment

Choose a reason for hiding this comment

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

LGTM, a small nitpick for simplication, as you don't really need versionised cache based on pyporject.toml.

.github/workflows/tests.yml Outdated Show resolved Hide resolved
Co-authored-by: Thomas Moreau <thomas.moreau.2010@gmail.com>
Copy link
Contributor

@janfb janfb left a comment

Choose a reason for hiding this comment

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

Great! thanks 🙏

@janfb janfb merged commit b3dbc94 into sbi-dev:main Mar 19, 2024
3 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