Skip to content

Commit

Permalink
speed up tests
Browse files Browse the repository at this point in the history
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
  • Loading branch information
baxen committed Jan 19, 2025
1 parent cde8c01 commit c9b2b96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
22 changes: 2 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/goose/tests/providers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit c9b2b96

Please sign in to comment.