From 1c026542cd6cd44b7177e90f080e87f231ee0d9c Mon Sep 17 00:00:00 2001 From: Gwo Tzu-Hsing Date: Mon, 30 Sep 2024 00:54:58 +0800 Subject: [PATCH] feat: update ci --- .github/workflows/ci.yml | 51 +++++++--------------------------------- fusio/src/error.rs | 4 ++-- 2 files changed, 11 insertions(+), 44 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 88c0fe3..f706f11 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,8 +11,8 @@ env: jobs: # 1 - tokio_check: - name: Rust project check on tokio + check: + name: Rust project check runs-on: ${{ matrix.os }} strategy: matrix: @@ -29,62 +29,29 @@ jobs: # `cargo check` command here will use installed `nightly` # as it is set as an "override" for current directory - - - name: Run cargo clippy on tokio + - name: Run cargo build on tokio uses: actions-rs/cargo@v1 with: - command: check - args: --package fusio --features "tokio" + command: build + args: --package fusio --features=tokio,aws,tokio-http - - name: Run cargo build on tokio + - name: Run cargo build on monoio uses: actions-rs/cargo@v1 with: command: build - args: --package fusio --features "tokio" + args: --package fusio --features=monoio - name: Run cargo test on tokio uses: actions-rs/cargo@v1 with: command: test - args: --package fusio --features "tokio" - - monoio_check: - name: Rust project check on monoio - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: - - ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install latest - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - components: rustfmt, clippy - - # `cargo check` command here will use installed `nightly` - # as it is set as an "override" for current directory - - - name: Run cargo clippy on monoio - uses: actions-rs/cargo@v1 - with: - command: check - args: --package fusio --features "monoio" - - - name: Run cargo build on monoio - uses: actions-rs/cargo@v1 - with: - command: build - args: --package fusio --features "monoio" + args: --package fusio --features=tokio,aws,tokio-http - name: Run cargo test on monoio uses: actions-rs/cargo@v1 with: command: test - args: --package fusio --features "monoio" - + args: --package fusio --features=monoio # 2 fmt: name: Rust fmt diff --git a/fusio/src/error.rs b/fusio/src/error.rs index 21fe069..90e58f0 100644 --- a/fusio/src/error.rs +++ b/fusio/src/error.rs @@ -12,8 +12,6 @@ pub enum Error { Path(#[from] crate::path::Error), #[error("unsupported operation")] Unsupported, - #[error(transparent)] - Other(#[from] BoxedError), #[error("invalid url: {0}")] InvalidUrl(BoxedError), #[cfg(feature = "http")] @@ -22,6 +20,8 @@ pub enum Error { status_code: http::StatusCode, body: String, }, + #[error(transparent)] + Other(#[from] BoxedError), } pub type BoxedError = Box;