Skip to content

Commit

Permalink
Added CI
Browse files Browse the repository at this point in the history
  • Loading branch information
johannwagner committed Sep 1, 2023
1 parent 9ac53f1 commit 110fbd4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Cargo Build & Test

on:
push:
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
build_and_test:
name: Rust project - latest
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v3
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: cargo check --verbose
- run: cargo clippy -- -D warnings
- run: cargo build --verbose
- run: cargo test --verbose

9 changes: 3 additions & 6 deletions src/lib/vicky/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,9 @@ impl<'r, 'o: 'r> Responder<'r, 'o> for VickyError {
// log `self` to your favored error tracker, e.g.
// sentry::capture_error(&self);

match self {
// in our simplistic example, we're happy to respond with the default 500 responder in all cases
_ => {
error!("Error: {}", self);
Status::InternalServerError.respond_to(req)
}
{
error!("Error: {}", self);
Status::InternalServerError.respond_to(req)
}
}
}

0 comments on commit 110fbd4

Please sign in to comment.