Skip to content

Instantly share code, notes, and snippets.

@ArtificialPB
Created December 6, 2022 16:38
Show Gist options
  • Save ArtificialPB/aaf7b59f696b9d140ae1183fd4ff155b to your computer and use it in GitHub Desktop.
Save ArtificialPB/aaf7b59f696b9d140ae1183fd4ff155b to your computer and use it in GitHub Desktop.
Github action step for caching RPC forked state. NOTE: edit the paths under `key` according to your project structure.
# Always try to load any available cache - saving it again after each run. Goal is to minimize RPC calls,
# speeding up tests. See: https://github.com/actions/cache/blob/main/workarounds.md#update-a-cache
- name: Cache Foundry forked state
uses: actions/cache@v3
with:
path: ~/.foundry/cache/rpc
key: ${{ runner.os }}-foundry-${{ hashFiles('./ethereum/kriptal/foundry.toml', './ethereum/kriptal/src/test/**/*.sol') }}
restore-keys: ${{ runner.os }}-foundry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment