Skip to content

Replace net_version with eth_chainId (#967) #1313

Replace net_version with eth_chainId (#967)

Replace net_version with eth_chainId (#967) #1313

Workflow file for this run

name: pull request
on:
pull_request:
push:
branches: [main]
jobs:
rust:
strategy:
matrix:
include:
- rust: 1.70.0
examples: false
continue-on-error: false
- rust: stable
examples: true
continue-on-error: false
- rust: beta
examples: false
continue-on-error: true
- rust: nightly
examples: false
continue-on-error: true
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.continue-on-error }}
env:
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
INFURA_PROJECT_ID: ${{ secrets.INFURA_PROJECT_ID }}
PK: ${{ secrets.PK }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
components: rustfmt, clippy
default: true
- uses: Swatinem/rust-cache@v1
- uses: foundry-rs/foundry-toolchain@v1
- run: cargo fmt -- --check
- run: cd examples/truffle && yarn --frozen-lockfile && yarn build
# Can't use --all-features here because web3 has mutually exclusive features.
- run: cargo clippy --all-targets -- -D warnings
# This is a workaround for a rustc/cargo bug we started encountering on Github Actions where
# running `cargo test` in the top level directory would fail with a linker error.
- run: |
(cd ethcontract && cargo test)
(cd ethcontract-common && cargo test)
(cd ethcontract-derive && cargo test)
(cd ethcontract-generate && cargo test)
- run: |
if ${{ matrix.examples }}; then
anvil -p 9545 &
# wait for anvil to start
while ! curl --silent http://127.0.0.1:9545; do
sleep 1
done
cargo run --package examples --example abi
cargo run --package examples --example async
cargo run --package examples --example batch
cargo run --package examples --example bytecode
cargo run --package examples --example deployments
cargo run --package examples --example events
cargo run --package examples --example revert
cargo run --package examples --example linked
# if [ "$PK" ] && [ "$INFURA_PROJECT_ID" ]; then
# cargo run --package examples-generate
# cargo run --package examples --example rinkeby
# cargo run --package examples --example sources
# fi
kill %1
fi