Skip to content

Conversation

@romanc
Copy link
Collaborator

@romanc romanc commented Sep 8, 2025

Description

This PR add GitHub Actions caches for the pre-commit environment and the translate test data. GitHub imposes the following rules on cache sharing. Caches can be restored by a workflow if

  1. they were created by a previous run of the workflow
  2. they were created by the target branch of this PR

We thus add an explicit cache creation workflow that runs when ever we merge into develop. This PR will create caches that can be reused (as intended by 2) above) by any PR targeting the develop branch.

The translate test workflow of this repository is re-used in other repository as a hook. This PR should (if I understand the docs correctly) generate translate test data caches that can be re-used by workflows from other repositories.

How Has This Been Tested?

This is a propagation of PR NOAA-GFDL/NDSL#202 in NDSL, which works as advertised. I'll double check after the first run that this also works as intended in this repository. If not, I'll do follow-up PRs in a timely manner.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation: N/A
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules: N/A
  • New check tests, if applicable, are included: N/A
  • Targeted model, if this change was triggered by a model need/shortcoming: N/A

@romanc
Copy link
Collaborator Author

romanc commented Sep 8, 2025

@fmalatino this is the same PR as in other repos. Can't tag you as a reviewer, so here's a manual ping 😉

@romanc romanc changed the title ci: effective cache sharing between PRs ci: add caches for pre-commit envionment and test data Sep 8, 2025
@romanc romanc changed the title ci: add caches for pre-commit envionment and test data ci: Add caches for pre-commit envionment and test data Sep 8, 2025
@fmalatino fmalatino added this pull request to the merge queue Sep 8, 2025
Merged via the queue into NOAA-GFDL:develop with commit 1805c49 Sep 8, 2025
3 checks passed
@romanc romanc deleted the romanc/ci-effective-cache-sharing branch September 8, 2025 12:06
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.

2 participants