Skip to content

Cache message-static-data in "pytest" workflow#339

Merged
khaeru merged 5 commits into
mainfrom
ci/cached-static-data
Apr 30, 2025
Merged

Cache message-static-data in "pytest" workflow#339
khaeru merged 5 commits into
mainfrom
ci/cached-static-data

Conversation

@khaeru

@khaeru khaeru commented Apr 29, 2025

Copy link
Copy Markdown
Member

This adjusts the workflow in order to reduce Git LFS bandwidth usage.

In particular:

  1. The message-static-data repo is checked out only once for each OS in the warm-lfs-cache job. This uses some of Git LFS bandwidth quota.
  2. The resulting files are stored in the GitHub Actions cache.
  3. The files are restored in the matrixed pytest job (5 per OS) to the same paths.

Neither of steps (2) or (3) count towards Git LFS bandwidth, so this should reduce our run rate.

Also:

How to review

  • Read the diff.
  • Note that the CI checks all pass.

PR checklist

  • Continuous integration checks all ✅
  • Add or expand tests; coverage checks both ✅
  • Add, expand, or update documentation. N/A; CI changes
  • Update doc/whatsnew.
  • (Once approved) Drop the TEMPORARY commit.

@khaeru khaeru added the ci Continuous integration & testing label Apr 29, 2025
@khaeru khaeru self-assigned this Apr 29, 2025
@khaeru khaeru requested a review from glatterf42 as a code owner April 29, 2025 07:57
@khaeru khaeru marked this pull request as draft April 29, 2025 08:00
@codecov

codecov Bot commented Apr 29, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.7%. Comparing base (3986245) to head (eab5347).
⚠️ Report is 767 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #339     +/-   ##
=======================================
- Coverage   78.6%   77.7%   -0.9%     
=======================================
  Files        215     215             
  Lines      17219   17220      +1     
=======================================
- Hits       13536   13389    -147     
- Misses      3683    3831    +148     
Files with missing lines Coverage Δ
message_ix_models/model/transport/testing.py 100.0% <ø> (ø)
...age_ix_models/tests/model/transport/test_report.py 92.3% <100.0%> (+<0.1%) ⬆️
message_ix_models/types.py 100.0% <ø> (ø)
message_ix_models/util/config.py 98.7% <100.0%> (ø)

... and 7 files with indirect coverage changes

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

@khaeru khaeru force-pushed the ci/cached-static-data branch from d327878 to 662153d Compare April 29, 2025 08:59
khaeru added a commit that referenced this pull request Apr 29, 2025
@khaeru khaeru marked this pull request as ready for review April 29, 2025 12:28
@khaeru khaeru requested a review from r-aneeque as a code owner April 29, 2025 12:28
@khaeru khaeru removed the request for review from r-aneeque April 29, 2025 12:28
@khaeru

khaeru commented Apr 29, 2025

Copy link
Copy Markdown
Member Author

I decided some of these things need to flow back to ixmp itself so we aren't making the same adjustments in multiple places → iiasa/ixmp#570. Will drop the commits from this branch once that is in.

@khaeru

khaeru commented Apr 29, 2025

Copy link
Copy Markdown
Member Author

Will drop the commits from this branch once that is in.

Okay, now done, and here is a workflow run that passes. I am not sure why some of the run times appear longer today.

I'll now rebase to drop the temporary commit so the PR is ready to merge.

khaeru added 4 commits April 29, 2025 23:56
- Bump astral-sh/setup-uv from v5 → v6.
- Remove actions/cache; use enable-cache arg to setup-uv.
- Use pre-commit itself to clear cached environments.
- Add --with=pre-commit-uv for better performance.
@khaeru khaeru force-pushed the ci/cached-static-data branch from 95bde5e to eab5347 Compare April 29, 2025 21:57
@khaeru khaeru merged commit ea59cd9 into main Apr 30, 2025
@khaeru khaeru deleted the ci/cached-static-data branch April 30, 2025 08:50
@khaeru khaeru mentioned this pull request May 4, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous integration & testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant