name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Lint
run: |
cargo fmt --all -- --check
cargo clippy --all-features --all-targets --workspace -- -D warnings
cargo test --all-features --workspace
- name: No Features
run: |
cargo clippy --no-default-features --all-targets -- -D warnings
cargo test --no-default-features
- uses: foundry-rs/foundry-toolchain@v1
- name: Examples
env:
ETHRPC: http://127.0.0.1:8545
run: |
anvil &
cargo run -p ethrpc-examples-curl
cargo run -p ethrpc-examples-custom
cargo run -p ethrpc-examples-http
kill -9 %1