From c9b2b96e90455e9eebd5e29f55c385b89496fded Mon Sep 17 00:00:00 2001 From: Bradley Axen Date: Sat, 18 Jan 2025 22:56:47 -0800 Subject: [PATCH] speed up tests it was nice to have ollama testing the format as an integration in CI, but those are covered well by unit tests already and this increased test times significantly --- .github/workflows/ci.yml | 22 ++-------------------- crates/goose/tests/providers.rs | 2 +- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c04a6e424..3116930916 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,27 +76,9 @@ jobs: restore-keys: | ${{ runner.os }}-cargo-build- - - name: Install Ollama - run: curl -fsSL https://ollama.com/install.sh | sh - - - name: Start Ollama - run: | - # Run the background, in a way that survives to the next step - nohup ollama serve > ollama.log 2>&1 & - # Block using the ready endpoint - time curl --retry 5 --retry-connrefused --retry-delay 1 -sf http://localhost:11434 - - - name: Test Ollama Model - run: ollama run qwen2.5 hello || cat ollama.log - - - name: Build Rust Project - run: cargo build - - name: Run Tests - run: cargo test --verbose - env: - OLLAMA_MODEL: "qwen2.5" - + run: cargo test + ## TODO: Need to decide if we wanna error out on clippy warnings. It was not being used before. # - name: Run Cargo Clippy (Lint) # run: cargo clippy -- -D warnings diff --git a/crates/goose/tests/providers.rs b/crates/goose/tests/providers.rs index 8ac513a351..4f9e66d31f 100644 --- a/crates/goose/tests/providers.rs +++ b/crates/goose/tests/providers.rs @@ -328,7 +328,7 @@ async fn test_databricks_provider_oauth() -> Result<()> { #[tokio::test] async fn test_ollama_provider() -> Result<()> { - test_provider("Ollama", &[], None, ollama::OllamaProvider::from_env).await + test_provider("Ollama", &["OLLAMA_HOST"], None, ollama::OllamaProvider::from_env).await } #[tokio::test]