From 807030fadf05cf12d648a6ee66405430ea1d1468 Mon Sep 17 00:00:00 2001 From: Nick Mitchell Date: Wed, 9 Apr 2025 11:44:22 -0400 Subject: [PATCH] test: update github action rust interpreter test to remove ollama pull This will force a test of the built-in rust-based pull logic. Signed-off-by: Nick Mitchell --- .github/workflows/rust-interpreter.yml | 2 -- pdl-live-react/src-tauri/src/pdl/interpreter.rs | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust-interpreter.yml b/.github/workflows/rust-interpreter.yml index f9827e813..18c0de249 100644 --- a/.github/workflows/rust-interpreter.yml +++ b/.github/workflows/rust-interpreter.yml @@ -30,7 +30,5 @@ jobs: npm ci & sudo apt update && sudo apt install -y libgtk-3-dev libwebkit2gtk-4.1-dev librsvg2-dev patchelf at-spi2-core & (curl -fsSL https://ollama.com/install.sh | sudo -E sh && sleep 2) wait - # todo: do this in rust - ollama pull granite3.2:2b - name: Run interpreter tests run: npm run test:interpreter diff --git a/pdl-live-react/src-tauri/src/pdl/interpreter.rs b/pdl-live-react/src-tauri/src/pdl/interpreter.rs index a0e9aac93..e5adbee1e 100644 --- a/pdl-live-react/src-tauri/src/pdl/interpreter.rs +++ b/pdl-live-react/src-tauri/src/pdl/interpreter.rs @@ -976,6 +976,8 @@ pub async fn run( debug: bool, stream: bool, ) -> Interpretation { + crate::pdl::pull::pull_if_needed(&program).await?; + let mut interpreter = Interpreter::new(); interpreter.debug = debug; interpreter.stream = stream; @@ -1007,7 +1009,6 @@ pub async fn run_file(source_file_path: &str, debug: bool, stream: bool) -> Inte let cwd = path.parent().and_then(|cwd| Some(cwd.to_path_buf())); let program = parse_file(&path)?; - crate::pdl::pull::pull_if_needed(&program).await?; run(&program, cwd, debug, stream).await }