Merge pull request #4 from vacp2p/ci

Ci
This commit is contained in:
Moudy 2024-10-02 23:26:07 +02:00 committed by GitHub
commit 3ba1b77cf2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 64 additions and 0 deletions

61
.github/workflows/ci.yml vendored Normal file
View File

@ -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

View File

@ -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
}

View File

@ -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)

View File

@ -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
}