test(ci): implement cache best practices for github workflows #8820
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
How to review this PR - Each commit in this series is a fully separate idea to improve things, and each should be reviewed separately by reading the commit message which explains that specific change then checking the diff for that commit
The basic idea is this though:
Related issues
A companion to the similar PR developed in FlutterFire repo:
The react-native-firebase repo already had many of the important best practices implemented from my previous work here so doesn't have quite as many changes as the FlutterFire PR
Release Summary
test-only
Checklist
AndroidiOSOther(macOS, web)e2etests added or updated inpackages/\*\*/e2ejesttests added or updated inpackages/\*\*/__tests__Test Plan
Best way to check it is to verify cache hit/miss info from the workflow runs themselves, in combination with a look at the LRU status of the caches for the whole repo (do we have old caches indicating our caches are long-lived and thus more useful?)
can look here https://github.com/invertase/react-native-firebase/actions/caches?query=sort%3Aaccessed-asc
Currently we do have some 3-day-old caches which indicates reasonable utility but there are lots of branch-specific caches and 3 days is not that old, so the changes here should help
Think
react-native-firebaseis great? Please consider supporting the project with any of the below:React Native FirebaseandInvertaseon Twitter