Skip to content

ci(bindings): fix rust cache with Swatinem/rust-cache #558

ci(bindings): fix rust cache with Swatinem/rust-cache

ci(bindings): fix rust cache with Swatinem/rust-cache #558

Workflow file for this run

name: Bindings
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
tests:
name: Bindings Tests
runs-on: macos-latest
env:
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
NOWNODES_API_KEY: ${{ secrets.NOWNODES_API_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install just
uses: extractions/setup-just@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Show Rust version
run: rustc --version
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Show Foundry version
run: forge --version
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Run rustfmt
run: just bindings-fmt-check
- name: Build Bindings
run: just bindings-build
- name: Lint Bindings
run: just bindings-lint
# bindings tests fork live RPCs via anvil; retry to absorb transient timeouts.
- name: Run Tests
run: |
for i in 1 2 3; do
just bindings-test && exit 0
[ "$i" -lt 3 ] && { echo "attempt $i failed, retrying in 10s"; sleep 10; }
done
exit 1