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 6f9bf80
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 42 deletions.
47 changes: 7 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:

jobs:
# 1
tokio_check:
check:
name: Rust project check on tokio
runs-on: ${{ matrix.os }}
strategy:
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
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 clippy 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

- name: Run cargo test on monoio
uses: actions-rs/cargo@v1
with:
command: test
args: --package fusio --features "monoio"

args: --package fusio --features=tokio,aws,tokio-http
# 2
fmt:
name: Rust fmt
Expand Down
5 changes: 3 additions & 2 deletions fusio/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ pub enum Error {
Io(#[from] io::Error),
#[cfg(feature = "http")]
Http(#[from] http::Error),
#[cfg(feature = "http")]
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 +21,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 6f9bf80

Please sign in to comment.