File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change 42
42
arch : ${{ matrix.arch }}
43
43
- uses : julia-actions/cache@v2
44
44
- uses : julia-actions/julia-buildpkg@v1
45
- - run : cd test/; julia --project=.. --color=yes --check-bounds=yes ${{ matrix.test_set.files }}
45
+ - run : |
46
+ cd test/
47
+ julia --project=.. maketests.jl
48
+ julia --project=.. --color=yes --check-bounds=yes ${{ matrix.test_set.files }}
46
49
docs :
47
50
name : Documentation
48
51
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change
1
+ using Tutorials
2
+ using Test
3
+
4
+ function get_title (files,filename)
5
+ for (title,fn) in files
6
+ if fn == filename
7
+ return title
8
+ end
9
+ end
10
+ error (" File $filename not found!" )
11
+ end
12
+
13
+ if (length (ARGS ) != 0 )
14
+ files = [get_title (Tutorials. files,filename)=> filename for filename in ARGS ]
15
+ else
16
+ files = Tutorials. files
17
+ end
18
+
19
+ for (title,filename) in files
20
+ # Create temporal modules to isolate and protect test scopes
21
+ tmpdir = mktempdir (;cleanup= true )
22
+ tmpmod = split (filename," ." )[1 ]
23
+ tmpfile = joinpath (tmpdir,tmpmod)
24
+ isfile (tmpfile) && error (" File $tmpfile already exists!" )
25
+ testpath = joinpath (@__DIR__ ," ../src" , filename)
26
+ open (tmpfile," w" ) do f
27
+ println (f, " # This file is automatically generated" )
28
+ println (f, " # Do not edit" )
29
+ println (f)
30
+ println (f, " module $tmpmod include(\" $testpath \" ) end" )
31
+ end
32
+ # @time @testset "$title" begin include(tmpfile) end
33
+ end
You can’t perform that action at this time.
0 commit comments