Compare commits
2 Commits
some_chang
...
658ef42e72
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
658ef42e72 | ||
| e823d59821 |
@@ -1,20 +0,0 @@
|
|||||||
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
|
|
||||||
@@ -17,7 +17,7 @@ spec:
|
|||||||
- name: gitea-registry
|
- name: gitea-registry
|
||||||
containers:
|
containers:
|
||||||
- name: bcard
|
- name: bcard
|
||||||
image: git.mikhailkilin.ru/killingdruid/bcard:fc31b9fd8861debe3aabe473408b1238e858303c
|
image: git.mikhailkilin.ru/killingdruid/bcard:e823d598214d96b8ad3fcf228ceb8707a11580a1
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 3000
|
- containerPort: 3000
|
||||||
---
|
---
|
||||||
|
|||||||
11
src/main.rs
11
src/main.rs
@@ -13,14 +13,3 @@ async fn main() {
|
|||||||
async fn handler() -> Html<&'static str> {
|
async fn handler() -> Html<&'static str> {
|
||||||
Html("<h1>Mikhail Kilin</h1>")
|
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