Add PR checks pipeline (fmt, clippy, test) and split CI config
- Split .woodpecker.yml into .woodpecker/check.yml (PR checks) and .woodpecker/deploy.yml (deploy on push to main) - Add basic handler test to src/main.rs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
11
src/main.rs
11
src/main.rs
@@ -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"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user