diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72e0f5ab..b17c174a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: - windows-latest arch: - x64 - test_env_var: + test_set: - "estimation" - "higher_order" - "plots" @@ -32,44 +32,48 @@ jobs: - version: '1.8' os: ubuntu-latest arch: x64 - test_env_var: "basic" + test_set: "basic" - version: '1.8' os: ubuntu-latest arch: x64 - test_env_var: "plots" + test_set: "plots" - version: '^1.10.0-0' os: ubuntu-latest arch: x64 - test_env_var: "estimation" + test_set: "estimation" allow_failure: true - version: '^1.10.0-0' os: ubuntu-latest arch: x64 - test_env_var: "higher_order" + test_set: "higher_order" allow_failure: true - version: '^1.10.0-0' os: ubuntu-latest arch: x64 - test_env_var: "plots" + test_set: "plots" allow_failure: true - version: '^1.10.0-0' os: ubuntu-latest arch: x64 - test_env_var: "basic" + test_set: "basic" allow_failure: true - version: 'nightly' os: ubuntu-latest arch: x64 - test_env_var: "basic" + test_set: "basic" allow_failure: true steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v1 with: version: ${{ matrix.version }} - arch: ${{ matrix.arch }} + arch: ${{ matrix.arch }} - name: Set Custom Test Environment Variable - run: echo "TEST_ENV_VAR=${{ matrix.test_env_var }}" >> $GITHUB_ENV + if: matrix.os == 'windows-latest' + run: echo "TEST_SET=${{ matrix.test_set }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 + - name: Set Custom Test Environment Variable (Unix) + if: matrix.os != 'windows-latest' + run: echo "TEST_SET=${{ matrix.test_set }}" >> $GITHUB_ENV - name: Set JULIA_NUM_THREADS for Julia 1.9 on Ubuntu if: matrix.version == '1.9' && matrix.os == 'ubuntu-latest' run: echo "JULIA_NUM_THREADS=2" >> $GITHUB_ENV diff --git a/test/runtests.jl b/test/runtests.jl index e8454ef5..65eb38bc 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -6,9 +6,9 @@ import StatsPlots, Turing # has to come before Aqua, otherwise exports are not r using Aqua using JET -test_env_var = ENV["TEST_ENV_VAR"] +test_set = ENV["TEST_SET"] -println("Running test set: $test_env_var") +println("Running test set: $test_set") println("Threads used: ", Threads.nthreads()) include("functionality_tests.jl") @@ -19,11 +19,11 @@ include("functionality_tests.jl") # end -if test_env_var == "estimation" +if test_set == "estimation" include("test_estimation.jl") end -if test_env_var == "higher_order" +if test_set == "higher_order" plots = true test_higher_order = true @@ -121,7 +121,7 @@ end -if test_env_var == "plots" +if test_set == "plots" plots = true @testset verbose = true "Backus_Kehoe_Kydland_1992" begin @@ -213,15 +213,10 @@ end -if test_env_var == "basic" +if test_set == "basic" plots = false test_higher_order = false - @testset verbose = true "Test various models: NSSS and 1st order solution" begin - include("test_models.jl") - end - GC.gc() - @testset verbose = true "Code quality (Aqua.jl)" begin # Aqua.test_all(MacroModelling) @testset "Compare Project.toml and test/Project.toml" Aqua.test_project_extras(MacroModelling) @@ -241,7 +236,11 @@ if test_env_var == "basic" end end - + @testset verbose = true "Test various models: NSSS and 1st order solution" begin + include("test_models.jl") + end + GC.gc() + @testset verbose = true "Standalone functions" begin include("test_standalone_function.jl") end