forked from GenXProject/GenX.jl
-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (40 loc) · 1.25 KB
/
test_examples.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Test-examples
on:
push:
schedule:
- cron: 21 4 * * * # Run at 12:21am US Eastern time
jobs:
test:
strategy:
matrix:
branch: ["main", "develop"]
version: ["1.8", "1.9", '1']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ matrix.branch }}
- uses: julia-actions/[email protected]
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
- uses: julia-actions/julia-buildpkg@v1
- name: Test examples
shell: julia --project=. --color=yes {0}
run: |
using GenX
using Test
base_path = Base.dirname(Base.dirname(pathof(GenX)))
examples_path = joinpath(base_path, "example_systems")
if !isdir(examples_path)
@warn "No example systems found in $examples_path"
exit(0)
end
@testset "Test examples" begin
for example_dir in readdir(examples_path, join=true)
if isdir(example_dir) && isfile(joinpath(example_dir, "Run.jl"))
@info "Running example in $example_dir"
@test isnothing(run_genx_case!(example_dir))
end
end
end