Skip to content

Commit 39eba87

Browse files
committed
use ParallelTestRunner.jl
1 parent 390bf15 commit 39eba87

6 files changed

Lines changed: 100 additions & 44 deletions

File tree

.github/workflows/CI.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ jobs:
3030
- uses: julia-actions/julia-buildpkg@v1
3131
- uses: julia-actions/julia-runtest@v1
3232
with:
33-
coverage: false
33+
test_args: '--verbose'
34+
coverage: false

Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ name = "JuliaAstroDocs"
22
uuid = "5ba9df79-bc07-467f-bade-66a1d49082bd"
33

44
[deps]
5+
ParallelTestRunner = "d3525ed8-44d0-4b2c-a655-542cee43accc"
56
TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9"
67

78
[compat]
9+
ParallelTestRunner = "2.0.1"
810
TypedTables = "1.4.6"
9-
julia = "1.6"
11+
julia = "1.10"
1012

1113
[workspace]
1214
projects = ["test", "docs"]

test/Project.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
[deps]
2+
ASDF2 = "da470b1c-b0a8-4533-b4d1-e613846a4bd7"
3+
AstroAngles = "5c4adb95-c1fc-4c53-b4ea-2a94080c53d2"
4+
AstroImages = "fe3fc30c-9b16-11e9-1c73-17dabf39f4ad"
5+
AstroLib = "c7932e45-9af1-51e7-9da9-f004cd3a462b"
6+
AstroTime = "c61b5328-d09d-5e37-a9a8-0eb41c39009c"
7+
Astroalign = "7f4629bd-323a-4fad-ad42-4ee56350f27f"
8+
BoxLeastSquares = "6c353534-c22b-44cc-9076-7b904de9fadc"
9+
CALCEPH = "1537fe66-4725-5aba-80f4-3a74792cecc1"
10+
CCDReduction = "b790e538-3052-4cb9-9f1f-e05859a455f5"
11+
CFITSIO = "3b1b4be9-1499-4b22-8d78-7db3344d1961"
12+
Cosmology = "76746363-e552-5dba-9a5a-cef6fa9cc5ab"
13+
DustExtinction = "fb44c06c-c62f-5397-83f5-69249e0a3c8e"
14+
ERFA = "17511681-8477-586a-8d98-4cfd5a1f2ec3"
15+
EarthOrientation = "732a3c5d-d6c0-58bc-adb1-1b51709a25e2"
16+
EphemerisSources = "858900df-f7ae-402a-aa8c-3e4ef85aa271"
17+
FITSIO = "525bcba6-941b-5504-bd06-fd0dc1a4d2eb"
18+
GeneralAstrodynamics = "8068df5b-8501-4530-bd82-d24d3c9619db"
19+
Healpix = "9f4e344d-96bc-545a-84a3-ae6b9e1b672b"
220
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
321
JuliaAstroDocs = "5ba9df79-bc07-467f-bade-66a1d49082bd"
22+
LACosmic = "a188e134-b1c0-4a25-bc7e-93a99f0f0e06"
23+
LombScargle = "fc60dff9-86e7-5f2f-a8a0-edeadbb75bd9"
24+
Orbits = "88f3d70c-3a4c-11ed-1389-4902f2e49de8"
25+
PSFModels = "9ba017d1-7760-46cd-84a3-1e79e9ae9ddc"
26+
ParallelTestRunner = "d3525ed8-44d0-4b2c-a655-542cee43accc"
27+
Photometry = "af68cb61-81ac-52ed-8703-edc140936be4"
428
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
29+
Reproject = "d1dcc2e6-806e-11e9-2897-3f99785db2ae"
30+
SAOImageDS9 = "dbce9b26-8eb4-4825-964b-d4940cf8daff"
31+
SPICE = "5bab7191-041a-5c2e-a744-024b9c3a5062"
32+
SkyCoords = "fc659fc5-75a3-5475-a2ea-3da92c065361"
533
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
34+
Transits = "2e59a628-7bac-4d38-8059-3a73ba0928ab"
35+
UnitfulAstro = "6112ee07-acf9-5e0f-b108-d242c714bf9f"
36+
WCS = "15f3aee2-9e10-537f-b834-a6fb8bdb944d"
37+
XPA = "d310a076-6a08-52b6-ab78-79baa254182b"

test/development.jl

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@testset "Development versions are compatible" begin
2+
ENV["JULIA_PKG_PRECOMPILE_AUTO"] = 0
3+
4+
for package in packages_juliaastro
5+
@testset "$(package.name)" begin
6+
@test Pkg.add(url=package.repo) == nothing
7+
end
8+
end
9+
10+
@testset "Precompilation" begin
11+
@test Pkg.precompile(; strict=true) == nothing
12+
end
13+
14+
@testset "Package loading" begin
15+
for package in packages_juliaastro
16+
@testset "$(package.name)" begin
17+
@test eval(quote
18+
@time_imports using $(Symbol(chopsuffix(package.name, ".jl")))
19+
end) == nothing
20+
end
21+
end
22+
end
23+
end

test/release.jl

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@testset "Latest release versions are compatible" begin
2+
for package in packages_juliaastro
3+
p_name = package.name
4+
# TODO: Include in testing when next release after v0.11.0
5+
p_name == "GeneralAstroDynamics" && continue
6+
@testset "$(p_name)" begin
7+
@test Pkg.add(chopsuffix(p_name, ".jl")) == nothing
8+
end
9+
end
10+
11+
@testset "Precompilation" begin
12+
@test Pkg.precompile(; strict=true) == nothing
13+
end
14+
15+
@testset "Package loading" begin
16+
for package in packages_juliaastro
17+
@testset "$(package.name)" begin
18+
@test eval(quote
19+
@time_imports using $(Symbol(chopsuffix(package.name, ".jl")))
20+
end) == nothing
21+
end
22+
end
23+
end
24+
end

test/runtests.jl

Lines changed: 16 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,52 +4,26 @@ This file defines integration tests for the JuliaAstro package ecosystem.
44
These are tests that confirm various packages can be installed and work together.
55
=#
66

7-
using Test, Pkg, InteractiveUtils
8-
7+
using ParallelTestRunner: runtests, find_tests, parse_args
98
import JuliaAstroDocs
109

11-
ecosystem_t = JuliaAstroDocs.ecosystem_t()
12-
13-
packages_juliaastro = filter(ecosystem_t) do package
14-
occursin("juliaastro", lowercase(package.repo))
15-
end
16-
unique!(p -> p.name, packages_juliaastro)
17-
sort!(packages_juliaastro)
18-
19-
@testset "JuliaAstro Package Evalauation" begin
20-
@testset "Compatible versions exist" begin
21-
ENV["JULIA_PKG_PRECOMPILE_AUTO"] = 0
22-
for package in packages_juliaastro
23-
p_name = package.name
24-
@testset "$(p_name)" begin
25-
@test Pkg.add(chopsuffix(p_name, ".jl")) == nothing
26-
end
27-
end
28-
end
10+
const init_code = quote
11+
# Start by testing that we can install all packages
12+
# Worry if they compile successfully after
13+
ENV["JULIA_PKG_PRECOMPILE_AUTO"] = 0
2914

30-
@testset "Development versions compatible" begin
31-
# Start by testing that we can install all packages
32-
# Worry if they compile successfully after
33-
ENV["JULIA_PKG_PRECOMPILE_AUTO"] = 0
15+
import Pkg
16+
using JuliaAstroDocs: ecosystem_t
17+
using InteractiveUtils: @time_imports
3418

35-
for package in packages_juliaastro
36-
@testset "$(package.name)" begin
37-
@test Pkg.add(url=package.repo) == nothing
38-
end
39-
end
19+
packages_juliaastro = filter(ecosystem_t()) do package
20+
occursin("juliaastro", lowercase(package.repo))
4021
end
22+
unique!(p -> p.name, packages_juliaastro)
23+
sort!(packages_juliaastro)
24+
end
4125

42-
@testset "Precompilation" begin
43-
@test Pkg.precompile(; strict=true) == nothing
44-
end
26+
args = parse_args(Base.ARGS)
27+
testsuite = find_tests(@__DIR__)
4528

46-
@testset "Package loading" begin
47-
for package in packages_juliaastro
48-
@testset "$(package.name)" begin
49-
@test eval(quote
50-
@time_imports using $(Symbol(chopsuffix(package.name, ".jl")))
51-
end) == nothing
52-
end
53-
end
54-
end
55-
end
29+
runtests(JuliaAstroDocs, args; testsuite, init_code)

0 commit comments

Comments
 (0)