Compare commits
3 Commits
d00e601f16
...
some_chang
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48c3b33bf4 | ||
|
|
4cca68e12b | ||
|
|
1870889abb |
20
.woodpecker/check.yml
Normal file
20
.woodpecker/check.yml
Normal 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
|
||||||
13
src/main.rs
13
src/main.rs
@@ -11,5 +11,16 @@ async fn main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn handler() -> Html<&'static str> {
|
async fn handler() -> Html<&'static str> {
|
||||||
Html("<h1>Mikhail Kilin</h1><p>bcard v2 — deployed via Woodpecker CI + ArgoCD</p>")
|
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