From 8e58840c85c1e72c3c190a63db17a157da64c0c9 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 | 86 +++++++--------------------------------- fusio/src/error.rs | 4 +- 2 files changed, 16 insertions(+), 74 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9251fe..7377e8c 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,99 +29,41 @@ 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 - uses: actions-rs/cargo@v1 - with: - command: check - args: --package fusio --features "tokio" - - name: Run cargo build on tokio uses: actions-rs/cargo@v1 with: command: build - args: --package fusio --features "tokio" - - - 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" + args: --package fusio --features=tokio,aws,tokio-http - name: Run cargo build on monoio uses: actions-rs/cargo@v1 with: command: build - args: --package fusio --features "monoio" + args: --package fusio --features=monoio - - name: Run cargo test on monoio + - name: Run cargo build on tokio-uring uses: actions-rs/cargo@v1 with: - command: test - args: --package fusio --features "monoio" - - tokio_uring_check: - name: Rust project check on tokio_uring - 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 + command: build + args: --package fusio --features=tokio-uring - - name: Run cargo clippy on tokio-uring + - name: Run cargo test on tokio uses: actions-rs/cargo@v1 with: - command: check - args: --package fusio --features "tokio-uring, futures" + command: test + args: --package fusio --features=tokio,aws,tokio-http - - name: Run cargo build on tokio-uring + - name: Run cargo test on monoio uses: actions-rs/cargo@v1 with: - command: build - args: --package fusio --features "tokio-uring, futures" + command: test + args: --package fusio --features=monoio - name: Run cargo test on tokio-uring uses: actions-rs/cargo@v1 with: command: test - args: --package fusio --features "tokio-uring, futures" - + args: --package fusio --features=tokio-uring # 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;