From 475896f754504f81844d89a79369feea9b5b73c2 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Mon, 16 Feb 2026 10:25:03 -0600 Subject: [PATCH] CI tests should skip some that are reliant on filesystem of user --- .forgejo/workflows/{demo.yaml => test.yaml} | 2 +- justfile | 2 ++ src/core/songs.rs | 15 +-------------- 3 files changed, 4 insertions(+), 15 deletions(-) rename .forgejo/workflows/{demo.yaml => test.yaml} (87%) diff --git a/.forgejo/workflows/demo.yaml b/.forgejo/workflows/test.yaml similarity index 87% rename from .forgejo/workflows/demo.yaml rename to .forgejo/workflows/test.yaml index 3bc4419..288542b 100644 --- a/.forgejo/workflows/demo.yaml +++ b/.forgejo/workflows/test.yaml @@ -6,7 +6,7 @@ jobs: - run: nix-env --install nodejs - name: checkout uses: actions/checkout@v4 - - run: nix --extra-experimental-features nix-command --extra-experimental-features flakes develop --command just test + - run: nix --extra-experimental-features nix-command --extra-experimental-features flakes develop --command just ci-test # test: # runs-on: rust-latest # steps: diff --git a/justfile b/justfile index ec23a7a..b87ae1e 100644 --- a/justfile +++ b/justfile @@ -21,6 +21,8 @@ clean: cargo clean test: cargo nextest run +ci-test: + cargo nextest run -- --skip test_db_and_model --skip test_update --skip test_song_slide_speed --skip test_song_to_slide --skip test_song_from_db bench: export NEXTEST_EXPERIMENTAL_BENCHMARKS=1 cargo nextest bench diff --git a/src/core/songs.rs b/src/core/songs.rs index 2663e6a..e612413 100644 --- a/src/core/songs.rs +++ b/src/core/songs.rs @@ -1387,11 +1387,7 @@ You saved my soul" } async fn add_db() -> Result { - // let mut data = dirs::data_local_dir().unwrap(); - // data.push("lumina"); - // data.push("library-db.sqlite3"); - let mut db_url = String::from("sqlite://./test.db"); - // db_url.push_str(data.to_str().unwrap()); + let db_url = String::from("sqlite://./test.db"); SqlitePool::connect(&db_url).await.into_diagnostic() } @@ -1488,15 +1484,6 @@ You saved my soul" } } - fn test_lisp_song() -> Value { - let lisp = read_to_string("./test_song.lisp").expect("oops"); - let lisp_value = crisp::reader::read(&lisp); - match lisp_value { - Value::List(v) => v.first().unwrap().clone(), - _ => Value::Nil, - } - } - #[test] fn test_verse_names_and_adding() { let mut song = Song::default();