From 8ad4dfba2715818de7632916081b04506f3a13fa Mon Sep 17 00:00:00 2001 From: Wataru Otsubo Date: Fri, 13 Sep 2024 19:37:49 +0900 Subject: [PATCH] fix: add LOCAL_TEST env var for local only test - add_qaqc_runlist_from_masterlogs works only when all of the master logs are located. but CI doesn't since log files are not included in the repo --- test/runtests.jl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index dbd8151..85205cb 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -51,15 +51,17 @@ true || include("../src/PSBoardDataBase.jl") @test PSBoardDataBase.add_qaqc_dispatch(db, dispatch_table) |> isnothing - @test PSBoardDataBase.add_qaqc_runlist_from_masterlogs(db, "input/log/") |> - isnothing + if haskey(ENV, "LOCAL_TEST") + @test PSBoardDataBase.add_qaqc_runlist_from_masterlogs(db, "input/log/") |> + isnothing - extra_100test_result_df = - CSV.read("input/PS board QAQC Data Base - 100回試験結果.csv", DataFrame) + extra_100test_result_df = + CSV.read("input/PS board QAQC Data Base - 100回試験結果.csv", DataFrame) - @test PSBoardDataBase.add_qaqc_100test_result(db, extra_100test_result_df) |> - isnothing + @test PSBoardDataBase.add_qaqc_100test_result(db, extra_100test_result_df) |> + isnothing - run(`sqlitebrowser $dbpath`) + run(`sqlitebrowser $dbpath`) + end end end