Merge pull request #11 from jjoshm/master #42
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
name: Rust | |
jobs: | |
tests-stable: | |
name: Tests (Stable) | |
runs-on: ubuntu-latest | |
env: | |
ETH_RPC_URL: https://eth-mainnet.alchemyapi.io/v2/Lc7oIGYeL_QvInzI0Wiu_pOZZDEKBrdf | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
- name: cargo test | |
run: cargo test --workspace --all-features | |
clippy: | |
name: clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
- name: clippy | |
run: cargo clippy --workspace --tests --all-features | |
env: | |
RUSTFLAGS: "-D warnings" | |
docs: | |
name: docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rust-docs | |
- uses: Swatinem/rust-cache@v2 | |
- name: doc | |
run: cargo doc --workspace --all-features --no-deps --document-private-items | |
env: | |
RUSTDOCFLAGS: "-D warnings" | |
fmt: | |
name: fmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- name: fmt --check | |
run: cargo fmt --all --check |