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.
After various attempts to improve the test reliability have settled on the following:
Update GitHub Actions Workflows for Performance
Overview
Update all GitHub Actions workflows to use the latest action versions (v4), optimize caching strategies, remove redundant operations, and improve job parallelism to reduce CI/CD execution time.
Files to Update
1.
.github/actions/setup/action.ymlChanges:
actions/checkout@v3step (workflows already checkout)~/.pnpm-storecache (handled bysetup-nodewithcache: 'pnpm')actions/setup-node@v3→actions/setup-node@v4actions/cache@v3→actions/cache@v4node_modulescache hit)restore-keystonode_modulescache for better cache hit rateKey improvements:
2.
.github/workflows/checks.ymlChanges:
runs-on: ubuntu-latest→runs-on: macos-latestin all jobsinstalljob (not effectively used, causes sequential execution)actions/checkout@v3→actions/checkout@v4in all jobsactions/cache@v3→actions/cache@v4(for Foundry caching)foundry-rs/foundry-toolchain@v1→foundry-rs/foundry-toolchain@v1.4.2(verify latest version)testjob:~/.foundrydirectory before installing Foundrycode-quality,test, andbuildjobs run in parallel (removeneeds: install)Key improvements:
3.
.github/workflows/test-no-v2.ymlChanges:
runs-on: ubuntu-latest→runs-on: macos-latestactions/checkout@v3→actions/checkout@v4actions/cache@v3→actions/cache@v4(for Foundry caching)foundry-rs/foundry-toolchain@v1→foundry-rs/foundry-toolchain@v1.4.2(verify latest version)~/.foundrydirectory before installing FoundryKey improvements:
4.
.github/workflows/test-all.ymlChanges:
runs-on: ubuntu-latest→runs-on: macos-latestactions/checkout@v3→actions/checkout@v4actions/cache@v3→actions/cache@v4(for Foundry caching)foundry-rs/foundry-toolchain@v1→foundry-rs/foundry-toolchain@v1.4.2(verify latest version)~/.foundrydirectory before installing FoundryKey improvements:
5.
.github/workflows/release.ymlChanges:
runs-on: ubuntu-latest→runs-on: macos-latestactions/checkout@v3→actions/checkout@v4changesets/action@v1→changesets/action@v1.4.0(verify latest version)Implementation Details
Setup Action Optimization
The setup action currently:
~/.pnpm-store(redundant -setup-nodehandles this)node_modules(useful, but should be conditional)After update:
setup-nodeWorkflow Parallelization
The
checks.ymlworkflow currently runs:installjob (does nothing useful)code-qualitywaits forinstalltestwaits forinstallbuildwaits forinstallAfter update:
code-quality,test,build) run in parallelFoundry Caching Strategy
Foundry installation can take 30-60 seconds. Adding explicit caching:
~/.foundry(default Foundry installation directory on Linux/macOS)foundry-${{ runner.os }}-${{ hashFiles('.github/workflows/*.yml') }}-v1.4.2foundry-${{ runner.os }}-(for partial matches)foundry-rs/foundry-toolchainactionNote: The
foundry-rs/foundry-toolchainaction has built-in RPC response caching (~/.foundry/cache/rpc), but caching the binaries themselves provides additional performance benefits.macOS Runner Implementation
All workflows will use
macos-latestinstead ofubuntu-latestfor better performance:macOS Runner Specs:Implementation:
runs-on: macos-latest~/.foundry(same on macOS)Considerations:
Version Verification
Before finalizing, verify the latest versions:
foundry-rs/foundry-toolchain: Check GitHub releases for latest v1.x tagchangesets/action: Check GitHub releases for latest v1.x tagExpected Performance Improvements
Testing Strategy