diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 71f9a5a..a3ce7f0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: version: - - "1.0" + - "min" - "1" - "nightly" os: diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml index ed74bb2..2265824 100644 --- a/.github/workflows/CompatHelper.yml +++ b/.github/workflows/CompatHelper.yml @@ -1,12 +1,14 @@ name: CompatHelper on: schedule: - - cron: 0 23 * * * + - cron: 0 23 */5 * * +permissions: + contents: write + pull-requests: write jobs: CompatHelper: runs-on: ubuntu-latest steps: - - name: Install CompatHelper shell: julia --color=yes {0} run: using Pkg; Pkg.add("CompatHelper") diff --git a/Project.toml b/Project.toml index 578c9d3..f3543fe 100644 --- a/Project.toml +++ b/Project.toml @@ -11,14 +11,9 @@ Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [compat] +Dates = "1" DelimitedFiles = "1" +LinearAlgebra = "1" +Printf = "1" StaticArrays = "0.5, 0.6, 0.7, 0.8, 0.9, 0.10, 0.11, 0.12, 1.0" -julia = "1" - -[extras] -Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" -Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[targets] -test = ["Test"] +julia = "1.10" diff --git a/src/jdcnv.jl b/src/jdcnv.jl index b2e6737..43f0e6a 100644 --- a/src/jdcnv.jl +++ b/src/jdcnv.jl @@ -49,5 +49,6 @@ equivalent to `jdcnv(now(Dates.UTC))`. For the conversion of Julian date to number of Julian days, use `juldate`. """ -const jdcnv = Dates.datetime2julian +jdcnv(d::DateTime) = Dates.datetime2julian(d) +jdcnv(d::AbstractString) = Dates.datetime2julian(Dates.DateTime(d)) jdcnv(date...) = jdcnv(DateTime(date...)) diff --git a/test/Project.toml b/test/Project.toml new file mode 100644 index 0000000..ecffb82 --- /dev/null +++ b/test/Project.toml @@ -0,0 +1,6 @@ +[deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/test/runtests.jl b/test/runtests.jl index 7609886..4d5ce59 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,17 +1,24 @@ # This file is a part of AstroLib.jl. License is MIT "Expat". # Copyright (C) 2016 Mosè Giordano. +using Aqua using AstroLib using Test using Dates -#using Documenter +using Documenter @testset "AstroLib" begin + @testset "Aqua.jl" begin + Aqua.test_all(AstroLib) + end + include("utils-tests.jl") include("misc-tests.jl") - #DocMeta.setdocmeta!(AstroLib, :DocTestSetup, :(using AstroLib), recursive=true) - #doctest(AstroLib) + if Sys.islinux() + DocMeta.setdocmeta!(AstroLib, :DocTestSetup, :(using AstroLib), recursive=true) + doctest(AstroLib) + end end # Dummy calls to "show" for new data types, just to increase code coverage.