Add github CI for substreams
This commit is contained in:
59
.github/workflows/substream.ci.yaml
vendored
Normal file
59
.github/workflows/substream.ci.yaml
vendored
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
name: Substreams CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- "substreams/**"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
name: Substreams Lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 30
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Setup toolchain
|
||||||
|
uses: dtolnay/rust-toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: nightly
|
||||||
|
components: clippy, rustfmt
|
||||||
|
|
||||||
|
- name: Setup Rust Cache
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
cache-on-failure: true
|
||||||
|
|
||||||
|
- name: Run checks
|
||||||
|
run: |
|
||||||
|
cd substreams
|
||||||
|
cargo +nightly fmt -- --check
|
||||||
|
cargo +nightly clippy --all --all-features --all-targets -- -D warnings
|
||||||
|
|
||||||
|
test:
|
||||||
|
name: Substreams Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 30
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Setup toolchain
|
||||||
|
uses: dtolnay/rust-toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
targets: wasm32-unknown-unknown
|
||||||
|
|
||||||
|
- name: Setup Rust Cache
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
cache-on-failure: true
|
||||||
|
|
||||||
|
- name: Run checks
|
||||||
|
run: |
|
||||||
|
cd substreams
|
||||||
|
cargo build --target wasm32-unknown-unknown --all-targets --all-features
|
||||||
|
cargo test --workspace --all-targets --all-features
|
||||||
@@ -126,10 +126,7 @@ pub fn aggregate_balances_changes(
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::{
|
use crate::{mock_store::MockStore, pb::tycho::evm::v1::BalanceDelta};
|
||||||
mock_store::MockStore,
|
|
||||||
pb::tycho::evm::v1::{BalanceDelta, Transaction},
|
|
||||||
};
|
|
||||||
use substreams::{
|
use substreams::{
|
||||||
pb::substreams::StoreDelta,
|
pb::substreams::StoreDelta,
|
||||||
prelude::{StoreGet, StoreNew},
|
prelude::{StoreGet, StoreNew},
|
||||||
|
|||||||
Reference in New Issue
Block a user