-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid running ci checks twice (#105)
* Avoid running ci checks twice * upgrade rust * move clippy config to cargo.toml
- Loading branch information
Showing
10 changed files
with
49 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,56 @@ | ||
pipeline: | ||
variables: | ||
- &rust_image "rust:1.77-bullseye" | ||
|
||
steps: | ||
cargo_fmt: | ||
image: rustdocker/rust:nightly | ||
commands: | ||
- /root/.cargo/bin/cargo fmt -- --check | ||
|
||
cargo_check: | ||
image: rust:1.70-bullseye | ||
environment: | ||
CARGO_HOME: .cargo | ||
commands: | ||
- cargo check --all-features --all-targets | ||
when: | ||
- event: pull_request | ||
|
||
cargo_clippy: | ||
image: rust:1.70-bullseye | ||
image: *rust_image | ||
environment: | ||
CARGO_HOME: .cargo | ||
commands: | ||
- rustup component add clippy | ||
- cargo clippy --all-targets --all-features -- | ||
-D warnings -D deprecated -D clippy::perf -D clippy::complexity | ||
-D clippy::dbg_macro -D clippy::inefficient_to_string | ||
-D clippy::items-after-statements -D clippy::implicit_clone | ||
-D clippy::wildcard_imports -D clippy::cast_lossless | ||
-D clippy::manual_string_new -D clippy::redundant_closure_for_method_calls | ||
- cargo clippy --all-features -- -D clippy::unwrap_used | ||
- cargo clippy --all-targets --all-features | ||
when: | ||
- event: pull_request | ||
|
||
cargo_test: | ||
image: rust:1.70-bullseye | ||
image: *rust_image | ||
environment: | ||
CARGO_HOME: .cargo | ||
commands: | ||
- cargo test --all-features --no-fail-fast | ||
when: | ||
- event: pull_request | ||
|
||
cargo_doc: | ||
image: rust:1.70-bullseye | ||
image: *rust_image | ||
environment: | ||
CARGO_HOME: .cargo | ||
commands: | ||
- cargo doc --all-features | ||
when: | ||
- event: pull_request | ||
|
||
cargo_run_actix_example: | ||
image: rust:1.70-bullseye | ||
image: *rust_image | ||
environment: | ||
CARGO_HOME: .cargo | ||
commands: | ||
- cargo run --example local_federation actix-web | ||
when: | ||
- event: pull_request | ||
|
||
cargo_run_axum_example: | ||
image: rust:1.70-bullseye | ||
image: *rust_image | ||
environment: | ||
CARGO_HOME: .cargo | ||
commands: | ||
- cargo run --example local_federation axum | ||
when: | ||
- event: pull_request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#![allow(clippy::unwrap_used)] | ||
|
||
use crate::{ | ||
instance::{listen, new_instance, Webserver}, | ||
objects::post::DbPost, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,7 @@ where | |
} | ||
|
||
#[cfg(test)] | ||
#[allow(clippy::unwrap_used)] | ||
mod test { | ||
use super::*; | ||
use crate::{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters