Add CI checks on PR (fmt, clippy, test) #3

Merged
killingdruid merged 2 commits from some_changes into main 2026-02-15 23:12:10 +00:00
3 changed files with 31 additions and 0 deletions

20
.woodpecker/check.yml Normal file
View File

@@ -0,0 +1,20 @@
when:
- event: pull_request
steps:
- name: fmt
image: rust:1.84
commands:
- rustup component add rustfmt
- cargo fmt -- --check
- name: clippy
image: rust:1.84
commands:
- rustup component add clippy
- cargo clippy -- -D warnings
- name: test
image: rust:1.84
commands:
- cargo test

View File

@@ -13,3 +13,14 @@ async fn main() {
async fn handler() -> Html<&'static str> {
Html("<h1>Mikhail Kilin</h1>")
}
#[cfg(test)]
mod tests {
use super::*;
#[tokio::test]
async fn test_handler() {
let response = handler().await;
assert!(response.0.contains("Mikhail Kilin"));
}
}