diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..17c8324 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,62 @@ +name: CI + +on: + push: + branches: + - main + - master + pull_request: + +permissions: + contents: read + +jobs: + test: + name: Julia ${{ matrix.version }} - package tests + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: + - 'lts' + - '1' + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.version }} + - uses: julia-actions/cache@v2 + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 + + aqua: + name: Julia ${{ matrix.version }} - Aqua tests + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: + - '1' + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.version }} + - uses: julia-actions/cache@v2 + - name: Run Aqua.jl + shell: julia --color=yes {0} + run: | + import Pkg + Pkg.activate(; temp=true) + Pkg.develop(Pkg.PackageSpec(path=pwd())) + Pkg.add("Aqua") + Pkg.instantiate() + + using Aqua + using WebCacheUtilities + + Aqua.test_all(WebCacheUtilities; stale_deps=false, deps_compat=false) diff --git a/src/file_cache.jl b/src/file_cache.jl index 5cbee33..83889a9 100644 --- a/src/file_cache.jl +++ b/src/file_cache.jl @@ -1,7 +1,7 @@ using Dates: Dates, TimePeriod using URIs: URI -export hit_file_cache, cache_json +export hit_file_cache function download_to_cache(filename::String, url::Union{String, URI}; kwargs...) file_path = hit_file_cache(filename; kwargs...) do file_path