From cbb8b2b2887d63df94dfa1a74bd4ce7af846dbd9 Mon Sep 17 00:00:00 2001 From: lexara-prime-ai Date: Thu, 11 Jul 2024 13:46:10 +0000 Subject: [PATCH 1/5] Added regression tests. --- rust/src/main.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/rust/src/main.rs b/rust/src/main.rs index 160033d..340fa2a 100644 --- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -86,4 +86,16 @@ mod tests { let services = result.unwrap(); assert!(!services.is_empty()); } + + #[tokio::test] + async fn test_find_service_by_environment() { + let result = ServiceManager::find_service_by_environment("image", "10").await; + + // The reult should be Ok(). + assert!(result.is_ok()); + + // Validate data. + let services = result.unwrap(); + assert!(!services.is_empty()); + } } From ad1dd484b811689375efd520c0ba4a1b895ae81e Mon Sep 17 00:00:00 2001 From: lexara-prime-ai Date: Thu, 11 Jul 2024 13:49:05 +0000 Subject: [PATCH 2/5] Clean up --- rust/src/main.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rust/src/main.rs b/rust/src/main.rs index 340fa2a..f32a059 100644 --- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -7,16 +7,17 @@ use tokio::main; /// Examples #[main] async fn main() { + /// Examples /// List all Services. let services = ServiceManager::list_all_services("20").await; - // List all Services by Name and Type. + /// List all Services by Name and Type. let services = ServiceManager::find_service_by_name_and_type("whoami", "web_service").await; - // List all Services by Region. + /// List all Services by Region. let services = ServiceManager::find_service_by_region("oregon", "10").await; - // List all Services by Environment. + /// List all Services by Environment. let services = ServiceManager::find_service_by_environment("image", "10").await; } @@ -48,6 +49,7 @@ async fn main() { /// let services = result.unwrap(); /// assert!(!services.is_empty()); /// } +/// /// More tests... #[cfg(test)] From 4bffe3dec7debe51502d28116dcd346978b96f98 Mon Sep 17 00:00:00 2001 From: lexara-prime-ai Date: Thu, 11 Jul 2024 13:54:52 +0000 Subject: [PATCH 3/5] Clean up --- rust/src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rust/src/main.rs b/rust/src/main.rs index f32a059..6ab77c5 100644 --- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -8,6 +8,8 @@ use tokio::main; #[main] async fn main() { /// Examples + /// 1. Querying for deployed Services. + /// /// List all Services. let services = ServiceManager::list_all_services("20").await; @@ -19,6 +21,7 @@ async fn main() { /// List all Services by Environment. let services = ServiceManager::find_service_by_environment("image", "10").await; + //////////////////////////////////////////////// } /// Checks for regression of service management functions From 6e1ee226deee213bddc4ea75cabaecc4e6726921 Mon Sep 17 00:00:00 2001 From: lexara-prime-ai Date: Thu, 11 Jul 2024 13:55:38 +0000 Subject: [PATCH 4/5] Bumped crate version --- rust/Cargo.lock | 2 +- rust/Cargo.toml | 2 +- rust/README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index c2f5612..66e2300 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -769,7 +769,7 @@ dependencies = [ [[package]] name = "render_cdk" -version = "0.0.3" +version = "0.0.4" dependencies = [ "anyhow", "base64", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index e88172c..c1142ee 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "render_cdk" -version = "0.0.3" +version = "0.0.4" edition = "2021" authors = ["Irfan Ghat"] description = "This crate provides a streamlined interface for interacting with Render, a platform that allows you to build, deploy, and scale your apps with ease." diff --git a/rust/README.md b/rust/README.md index 1ca5bec..5afbabb 100644 --- a/rust/README.md +++ b/rust/README.md @@ -24,7 +24,7 @@ Add `render_cdk` to your `Cargo.toml`: ```toml [dependencies] -render_cdk = "0.0.1" +render_cdk = "0.0.4" ``` ### Usage From 3f58aae86115574f396447a2cabc10e67b12cea8 Mon Sep 17 00:00:00 2001 From: lexara-prime-ai Date: Thu, 11 Jul 2024 13:57:20 +0000 Subject: [PATCH 5/5] Updated code-coverage config --- .github/workflows/code-coverage.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index a0391a4..d923697 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -1,2 +1,7 @@ - name: Code Coverage Summary - uses: irongut/CodeCoverageSummary@v1.3.0 \ No newline at end of file + uses: irongut/CodeCoverageSummary@v1.3.0 + + 'on': + push: + branches: [ "master" ] + tags: '*' \ No newline at end of file