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 29, 2024
1 parent dc617e4 commit 1c02654
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 44 deletions.
51 changes: 9 additions & 42 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,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
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 1c02654

Please sign in to comment.