Skip to content

Commit

Permalink
feat: update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ethe committed Sep 30, 2024
1 parent 3e2dc80 commit 8e58840
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 74 deletions.
86 changes: 14 additions & 72 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions fusio/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand All @@ -22,6 +20,8 @@ pub enum Error {
status_code: http::StatusCode,
body: String,
},
#[error(transparent)]
Other(#[from] BoxedError),
}

pub type BoxedError = Box<dyn std::error::Error + Send + Sync + 'static>;

0 comments on commit 8e58840

Please sign in to comment.