From 4e207de4be051027062eabf10d9469fa1492eeae Mon Sep 17 00:00:00 2001 From: Mike Garde Date: Fri, 14 Aug 2026 10:35:23 -0400 Subject: [PATCH 1/2] Add Rust CI pipeline for testing - Automate linting and tests on every push and pull request. - Integrate Codecov for automated coverage reporting. --- .github/workflows/test.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..434d21b --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,39 @@ +name: Test Rust + +on: + push: + branches: [ "main", "develop" ] + pull_request: + branches: [ "main", "develop" ] + +permissions: + contents: read + +jobs: + test: + name: Test and Coverage + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v7 + + - name: Set up Rust + uses: dtolnay/rust-toolchain@stable + with: + components: clippy + + - name: Lint + run: cargo clippy --all-targets --all-features -- -D warnings + + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + + - name: Generate coverage + run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + files: lcov.info + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true From 94fd823c3295a4fd51bbaeacecc3365b76852403 Mon Sep 17 00:00:00 2001 From: Mike Garde Date: Fri, 14 Aug 2026 10:40:13 -0400 Subject: [PATCH 2/2] Allowing dead code for now Future version will allow interactive model selection --- src/llm/ollama.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/llm/ollama.rs b/src/llm/ollama.rs index 5c9778e..e7fbece 100644 --- a/src/llm/ollama.rs +++ b/src/llm/ollama.rs @@ -37,11 +37,14 @@ struct OllamaUsage { total_tokens: Option, } +// Scaffolding for a future "list models" command; only exercised by tests today. +#[allow(dead_code)] #[derive(Debug, Decode)] struct OllamaTagModel { name: String, } +#[allow(dead_code)] #[derive(Debug, Decode)] struct OllamaTagsResponse { models: Vec, @@ -173,6 +176,8 @@ impl OllamaClient { } } + /// Scaffolding for a future "list models" command; only exercised by tests today. + #[allow(dead_code)] fn tags_url(&self) -> String { format!("{}/api/tags", self.base_url) }