diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8046e27 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,61 @@ +on: + push: + branches: + - master + paths-ignore: + - "**.md" + - "!.github/workflows/*.yml" + + pull_request: + paths-ignore: + - "**.md" + - "!.github/workflows/*.yml" + +name: General + +jobs: + build: + strategy: + matrix: + platform: [ ubuntu-latest, macos-latest ] + runs-on: ${{ matrix.platform }} + timeout-minutes: 60 + + name: build - ${{ matrix.platform }} + steps: + - uses: actions/checkout@v3 + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + - uses: Swatinem/rust-cache@v2 + - run: cargo build + + lint: + strategy: + matrix: + platform: [ ubuntu-latest ] + runs-on: ${{ matrix.platform }} + timeout-minutes: 60 + + name: lint - ${{ matrix.crate }} - ${{ matrix.platform }} + steps: + - name: Checkout sources + uses: actions/checkout@v3 + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + components: rustfmt, clippy + - uses: Swatinem/rust-cache@v2 + - name: cargo fmt + if: success() || failure() + run: cargo fmt -- --check + - name: cargo clippy + if: success() || failure() + run: | + cargo clippy --release -- -D warnings diff --git a/node_runner/src/lib.rs b/node_runner/src/lib.rs index d8a957c..4c5e698 100644 --- a/node_runner/src/lib.rs +++ b/node_runner/src/lib.rs @@ -11,6 +11,7 @@ pub async fn main_runner() -> Result<()> { let _http_server_handle = http_server.handle(); tokio::spawn(http_server); + #[allow(clippy::empty_loop)] loop { //ToDo: Insert activity into main loop } diff --git a/rpc_primitives/src/errors.rs b/rpc_primitives/src/errors.rs index f718baf..6bbf207 100644 --- a/rpc_primitives/src/errors.rs +++ b/rpc_primitives/src/errors.rs @@ -4,6 +4,7 @@ use std::fmt; #[derive(serde::Serialize)] pub struct RpcParseError(pub String); +#[allow(clippy::too_long_first_doc_paragraph)] /// This struct may be returned from JSON RPC server in case of error /// It is expected that that this struct has impls From<_> all other RPC errors /// like [`RpcBlockError`](crate::types::blocks::RpcBlockError) diff --git a/sequencer_runner/src/lib.rs b/sequencer_runner/src/lib.rs index 181b8cf..1c9ed3c 100644 --- a/sequencer_runner/src/lib.rs +++ b/sequencer_runner/src/lib.rs @@ -11,6 +11,7 @@ pub async fn main_runner() -> Result<()> { let _http_server_handle = http_server.handle(); tokio::spawn(http_server); + #[allow(clippy::empty_loop)] loop { //ToDo: Insert activity into main loop }