Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ jobs:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v3
- name: Add AstroRegistry
shell: julia --project=. --color=yes {0}
run: |
import Pkg
Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/astro-group-bristol/AstroRegistry/"))
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
with:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
with:
version: "1"
- uses: julia-actions/cache@v3
- name: Add AstroRegistry
shell: julia --project=. --color=yes {0}
run: |
import Pkg
Pkg.Registry.add("General")
Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/astro-group-bristol/AstroRegistry/"))
- uses: julia-actions/julia-docdeploy@v1
env:
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
Expand Down
34 changes: 29 additions & 5 deletions test/_packages.jl
Original file line number Diff line number Diff line change
@@ -1,31 +1,55 @@
function test_packages(mode)
Pkg.activate(; temp = true)
@testset "Compatibility - $(mode)" begin
for package in packages_juliaastro
p_name = package.name
@info string("Adding: ", p_name)
@testset "$(p_name)" begin
if mode == :release
if p_name == "Spectra.jl"
# TODO: Register
@test Pkg.add(url="https://github.com/JuliaAstro/Spectra.jl") == nothing
if p_name == "ASDF.jl"
# TODO: Register ASDF.jl v2 (v1 Python version currently broken)
@test_skip p_name
elseif p_name == "Spectra.jl"
# TODO: Register SpectrumBase.jl
@test_skip p_name
elseif p_name == "GeneralAstrodynamics.jl"
@test_skip p_name
else
@info "Adding package" p_name
@test Pkg.add(chopsuffix(p_name, ".jl")) == nothing
end
elseif mode == :dev
@test Pkg.add(url=package.repo) == nothing
# Currently needed for Astroalign.jl until ConsensusFitting.jl is registered
Pkg.add(url = "https://github.com/JuliaAstro/ConsensusFitting.jl")
if p_name == "GeneralAstrodynamics.jl"
# https://github.com/JuliaAstro/GeneralAstrodynamics.jl/pull/275
repo = "https://github.com/JuliaAstro/GeneralAstrodynamics.jl"
Pkg.add([
Pkg.PackageSpec(; url = repo, subdir = "lib/AstrodynamicalCalculations"),
Pkg.PackageSpec(; url = repo, subdir = "lib/AstrodynamicalModels"),
Pkg.PackageSpec(; url = repo, subdir = "lib/AstrodynamicalSolvers"),
Pkg.PackageSpec(; url = repo),
])
@test Pkg.add(url = "https://github.com/JuliaAstro/GeneralAstrodynamics.jl") == nothing
else
@test Pkg.add(url = package.repo) == nothing
end
else
throw(ArgumentError("`mode` argument to `test_packages` must be either `:release` or `:dev`."))
end
end
end

@testset "Precompilation" begin
@test Pkg.precompile(; strict=true) == nothing
@test (Pkg.precompile(; strict = true); true)
end

@testset "Package loading" begin
for package in packages_juliaastro
p_name = package.name
if mode == :release && p_name ∈ ["ASDF.jl", "Spectra.jl", "GeneralAstrodynamics.jl"]
continue
end
@info string("Loading: ", p_name)
@testset "$(p_name)" begin
@test eval(quote
Expand Down
Loading