Skip to content

Commit

Permalink
set windows env var
Browse files Browse the repository at this point in the history
  • Loading branch information
thorek1 committed Nov 19, 2023
1 parent 056cfc8 commit f899c58
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- windows-latest
arch:
- x64
test_env_var:
test_set:
- "estimation"
- "higher_order"
- "plots"
Expand All @@ -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
Expand Down
23 changes: 11 additions & 12 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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

Expand Down Expand Up @@ -121,7 +121,7 @@ end



if test_env_var == "plots"
if test_set == "plots"
plots = true

@testset verbose = true "Backus_Kehoe_Kydland_1992" begin
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit f899c58

Please sign in to comment.