From 59f1df28bc26acfb77f06092ff70119c1dd958cf Mon Sep 17 00:00:00 2001 From: Pia Date: Mon, 29 Jan 2024 17:11:27 +0800 Subject: [PATCH] fix: CI --- .github/workflows/ci.yml | 21 ++++++++++++++------- README.md | 2 ++ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f1c7c4c4..e579e145 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,18 +8,25 @@ on: - main jobs: - clippy and fmt: + test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + + - name: Install clippy + run: rustup component add clippy + + - name: Install rustfmt + run: rustup component add rustfmt + - name: Run clippy for native - run: cargo clippy --all --all-targets -- -D warnings + run: cargo clippy --all --all-targets -- -D warnings + - name: Run fmt run: cargo fmt -- --check - - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 + - name: Run tests run: cargo test --all --all-targets -- --nocapture diff --git a/README.md b/README.md index bec79cf3..97b421f2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Herodotus Data Processor (HDP) +[![CI](https://github.com/HerodotusDev/hdp/actions/workflows/ci.yml/badge.svg)](https://github.com/HerodotusDev/hdp/actions/workflows/ci.yml) + ## Main Workflow in `main.rs` - **`EventWatcher`**: Scrapes events from `HreExecutionStore.sol`.