2024-04-09 09:28:57 +00:00
|
|
|
variables:
|
2024-06-11 09:16:04 +00:00
|
|
|
- &rust_image "rust:1.78-bullseye"
|
|
|
|
|
2024-04-09 09:28:57 +00:00
|
|
|
steps:
|
2023-03-24 20:48:51 +00:00
|
|
|
cargo_fmt:
|
2022-06-02 11:17:12 +00:00
|
|
|
image: rustdocker/rust:nightly
|
|
|
|
commands:
|
|
|
|
- /root/.cargo/bin/cargo fmt -- --check
|
2024-04-09 09:28:57 +00:00
|
|
|
when:
|
|
|
|
- event: pull_request
|
2022-06-02 11:17:12 +00:00
|
|
|
|
2023-03-24 20:48:51 +00:00
|
|
|
cargo_clippy:
|
2024-04-09 09:28:57 +00:00
|
|
|
image: *rust_image
|
2022-11-26 16:12:48 +00:00
|
|
|
environment:
|
|
|
|
CARGO_HOME: .cargo
|
2022-06-02 11:17:12 +00:00
|
|
|
commands:
|
|
|
|
- rustup component add clippy
|
2024-04-09 09:28:57 +00:00
|
|
|
- cargo clippy --all-targets --all-features
|
|
|
|
when:
|
|
|
|
- event: pull_request
|
2022-06-02 11:17:12 +00:00
|
|
|
|
2023-03-24 20:48:51 +00:00
|
|
|
cargo_test:
|
2024-04-09 09:28:57 +00:00
|
|
|
image: *rust_image
|
2022-06-02 11:17:12 +00:00
|
|
|
environment:
|
2022-11-26 16:12:48 +00:00
|
|
|
CARGO_HOME: .cargo
|
2022-06-02 11:17:12 +00:00
|
|
|
commands:
|
2023-03-01 23:19:10 +00:00
|
|
|
- cargo test --all-features --no-fail-fast
|
2024-04-09 09:28:57 +00:00
|
|
|
when:
|
|
|
|
- event: pull_request
|
2022-06-02 12:30:08 +00:00
|
|
|
|
2023-03-24 20:48:51 +00:00
|
|
|
cargo_doc:
|
2024-04-09 09:28:57 +00:00
|
|
|
image: *rust_image
|
2023-03-01 23:19:10 +00:00
|
|
|
environment:
|
|
|
|
CARGO_HOME: .cargo
|
|
|
|
commands:
|
|
|
|
- cargo doc --all-features
|
2024-04-09 09:28:57 +00:00
|
|
|
when:
|
|
|
|
- event: pull_request
|
2023-03-01 23:19:10 +00:00
|
|
|
|
2023-03-24 20:48:51 +00:00
|
|
|
cargo_run_actix_example:
|
2024-04-09 09:28:57 +00:00
|
|
|
image: *rust_image
|
2022-06-02 12:30:08 +00:00
|
|
|
environment:
|
2022-11-26 16:12:48 +00:00
|
|
|
CARGO_HOME: .cargo
|
2022-06-02 12:30:08 +00:00
|
|
|
commands:
|
2023-03-02 14:18:06 +00:00
|
|
|
- cargo run --example local_federation actix-web
|
2024-04-09 09:28:57 +00:00
|
|
|
when:
|
|
|
|
- event: pull_request
|
2023-03-01 23:19:10 +00:00
|
|
|
|
2023-03-24 20:48:51 +00:00
|
|
|
cargo_run_axum_example:
|
2024-04-09 09:28:57 +00:00
|
|
|
image: *rust_image
|
2022-11-28 21:19:56 +00:00
|
|
|
environment:
|
|
|
|
CARGO_HOME: .cargo
|
|
|
|
commands:
|
2023-03-02 14:18:06 +00:00
|
|
|
- cargo run --example local_federation axum
|
2024-04-09 09:28:57 +00:00
|
|
|
when:
|
|
|
|
- event: pull_request
|