From 830ba57327bf690e34adc5bba4d7070dd93320ed Mon Sep 17 00:00:00 2001 From: dehann Date: Fri, 10 Jan 2025 22:03:12 -0800 Subject: [PATCH 1/3] start CI setup --- .github/workflows/ci.yml | 10 +++++++--- src/lib.rs | 10 +++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b229c8c..8bb4c72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,11 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Build - run: cargo build --verbose + - name: Build wasm + run: cargo build -F wasm + - name: Build tokio + run: cargo build -F tokio - name: Run tests - run: cargo test --verbose + run: cargo test -F tokio + env: + NAVABILITY_USERLABEL: "test@wherewhen.ai" diff --git a/src/lib.rs b/src/lib.rs index 998181b..ef21984 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1545,13 +1545,13 @@ mod tests { #[test] fn test_get_robots() { - let nva_userlabel: String = - std::env::var("NAVABILITY_USERLABEL").expect("Missing NAVABILITY_USERLABEL env var"); + let nva_userlabel: String = "test@wherewhen.ai".to_owned(); + // std::env::var("NAVABILITY_USERLABEL").expect("Missing NAVABILITY_USERLABEL env var"); - let nva_api_token: String = - std::env::var("NAVABILITY_API_TOKEN").expect("Missing NAVABILITY_API_TOKEN env var"); + let nva_api_token: String = "".to_owned(); + // std::env::var("NAVABILITY_API_TOKEN").expect("Missing NAVABILITY_API_TOKEN env var"); - let api_url: &str = "https://api.d1.navability.io/graphql"; + let api_url: &str = "https://api.navability.io/graphql"; let client = NavAbilityClient::new(&api_url.to_string(), &nva_userlabel, &nva_api_token); println!("client: {:?}", client); From 0894329541f927b51a8a857ee64740b4de069300 Mon Sep 17 00:00:00 2001 From: dehann Date: Fri, 10 Jan 2025 22:04:52 -0800 Subject: [PATCH 2/3] CI test against develop branch changes --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8bb4c72..c2165b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [ "main" ] + branches: [ "develop" ] pull_request: - branches: [ "main" ] + branches: [ "develop" ] env: CARGO_TERM_COLOR: always From 4c88570a57b5a06fe35e18e98276d81353c67c71 Mon Sep 17 00:00:00 2001 From: dehann Date: Fri, 10 Jan 2025 22:06:51 -0800 Subject: [PATCH 3/3] update readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5f5ad7e..e95d9a4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # NavAbilitySDK.rs +[![CI](https://github.com/NavAbility/NavAbilitySDK.rs/actions/workflows/ci.yml/badge.svg)](https://github.com/NavAbility/NavAbilitySDK.rs/actions/workflows/ci.yml) + Under development