From ec93a07d95d464e211b0871c7d45429844c327f3 Mon Sep 17 00:00:00 2001 From: Simeon David Schaub Date: Fri, 5 Aug 2022 23:52:53 +0200 Subject: [PATCH 1/2] wip --- .github/workflows/ci.yml | 125 +++++++++++++++++++++------------------ 1 file changed, 67 insertions(+), 58 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2399382..3718115 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,67 +1,76 @@ name: CI on: - push - - pull_request + #- pull_request - release jobs: - test: - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - version: - - '1.6' - - '1' - - 'nightly' - os: - - ubuntu-latest - - macOS-latest - - windows-latest - arch: - - x64 - fail-fast: false - steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 - with: - version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - - uses: actions/cache@v1 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ runner.os }}-test-${{ env.cache-name }}- - ${{ runner.os }}-test- - ${{ runner.os }}- - - uses: julia-actions/julia-buildpkg@latest - - uses: julia-actions/julia-runtest@latest - - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v1 - with: - file: lcov.info - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - # don't run ci twice on my own PRs - if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }} - - docs: - name: Documentation + foo: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 - with: - version: '1' - run: | - julia --project=docs -e ' - using Pkg - Pkg.instantiate()' - - run: julia --project=docs docs/make.jl + echo bar > foo + export out=$(gh gist create foo) + gh gist delete $(echo $out | tail -n1) env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} - # don't run ci twice on my own PRs - if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }} + GITHUB_TOKEN: ${{ secrets.GIST_TESTING_TOKEN }} + # test: + # name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} + # runs-on: ${{ matrix.os }} + # strategy: + # matrix: + # version: + # - '1.6' + # - '1' + # - 'nightly' + # os: + # - ubuntu-latest + # - macOS-latest + # - windows-latest + # arch: + # - x64 + # fail-fast: false + # steps: + # - uses: actions/checkout@v2 + # - uses: julia-actions/setup-julia@v1 + # with: + # version: ${{ matrix.version }} + # arch: ${{ matrix.arch }} + # - uses: actions/cache@v1 + # env: + # cache-name: cache-artifacts + # with: + # path: ~/.julia/artifacts + # key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} + # restore-keys: | + # ${{ runner.os }}-test-${{ env.cache-name }}- + # ${{ runner.os }}-test- + # ${{ runner.os }}- + # - uses: julia-actions/julia-buildpkg@latest + # - uses: julia-actions/julia-runtest@latest + # - uses: julia-actions/julia-processcoverage@v1 + # - uses: codecov/codecov-action@v1 + # with: + # file: lcov.info + # env: + # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + # # don't run ci twice on my own PRs + # if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }} + # + # docs: + # name: Documentation + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v2 + # - uses: julia-actions/setup-julia@v1 + # with: + # version: '1' + # - run: | + # julia --project=docs -e ' + # using Pkg + # Pkg.instantiate()' + # - run: julia --project=docs docs/make.jl + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} + # # don't run ci twice on my own PRs + # if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }} From 310a2261dc35b06651c0e57063cf268d46b5fa3e Mon Sep 17 00:00:00 2001 From: Simeon David Schaub Date: Sat, 6 Aug 2022 01:37:21 +0200 Subject: [PATCH 2/2] wip --- .github/workflows/ci.yml | 127 ++++++++++++------------- Project.toml | 4 +- README.md | 43 ++++----- docs/Manifest.toml | 200 +++++++++++++++++++++------------------ src/ArtifactUtils.jl | 5 + test/runtests.jl | 31 ++++++ 6 files changed, 229 insertions(+), 181 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3718115..651bac9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,76 +1,69 @@ name: CI on: - push - #- pull_request + - pull_request - release jobs: - foo: + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + version: + - '1.6' + - '1' + - 'nightly' + os: + - ubuntu-latest + - macOS-latest + - windows-latest + arch: + - x64 + fail-fast: false + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: actions/cache@v1 + env: + cache-name: cache-artifacts + with: + path: ~/.julia/artifacts + key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} + restore-keys: | + ${{ runner.os }}-test-${{ env.cache-name }}- + ${{ runner.os }}-test- + ${{ runner.os }}- + - uses: julia-actions/julia-buildpkg@latest + - uses: julia-actions/julia-runtest@latest + env: + GITHUB_TOKEN: ${{ secrets.GIST_TESTING_TOKEN }} + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v1 + with: + file: lcov.info + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + # don't run ci twice on my own PRs + if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }} + + docs: + name: Documentation runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: '1' - run: | - echo bar > foo - export out=$(gh gist create foo) - gh gist delete $(echo $out | tail -n1) + julia --project=docs -e ' + using Pkg + Pkg.instantiate()' + - run: julia --project=docs docs/make.jl env: - GITHUB_TOKEN: ${{ secrets.GIST_TESTING_TOKEN }} - # test: - # name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - # runs-on: ${{ matrix.os }} - # strategy: - # matrix: - # version: - # - '1.6' - # - '1' - # - 'nightly' - # os: - # - ubuntu-latest - # - macOS-latest - # - windows-latest - # arch: - # - x64 - # fail-fast: false - # steps: - # - uses: actions/checkout@v2 - # - uses: julia-actions/setup-julia@v1 - # with: - # version: ${{ matrix.version }} - # arch: ${{ matrix.arch }} - # - uses: actions/cache@v1 - # env: - # cache-name: cache-artifacts - # with: - # path: ~/.julia/artifacts - # key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - # restore-keys: | - # ${{ runner.os }}-test-${{ env.cache-name }}- - # ${{ runner.os }}-test- - # ${{ runner.os }}- - # - uses: julia-actions/julia-buildpkg@latest - # - uses: julia-actions/julia-runtest@latest - # - uses: julia-actions/julia-processcoverage@v1 - # - uses: codecov/codecov-action@v1 - # with: - # file: lcov.info - # env: - # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - # # don't run ci twice on my own PRs - # if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }} - # - # docs: - # name: Documentation - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v2 - # - uses: julia-actions/setup-julia@v1 - # with: - # version: '1' - # - run: | - # julia --project=docs -e ' - # using Pkg - # Pkg.instantiate()' - # - run: julia --project=docs docs/make.jl - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} - # # don't run ci twice on my own PRs - # if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} + # don't run ci twice on my own PRs + if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }} diff --git a/Project.toml b/Project.toml index 4117ae8..bec8102 100644 --- a/Project.toml +++ b/Project.toml @@ -21,8 +21,10 @@ gh_cli_jll = "2" julia = "1.6" [extras] +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test", "TOML"] +test = ["Test", "Artifacts", "Documenter", "TOML"] diff --git a/README.md b/README.md index d4fa4d5..e1d9f56 100644 --- a/README.md +++ b/README.md @@ -29,16 +29,23 @@ julia> add_artifact!( SHA1("6c460cf2eccecd24499618112adbbe7e403fa1ee") julia> import Pkg; Pkg.ensure_artifact_installed("JuliaMono", "Artifacts.toml") - Downloaded artifact: JuliaMono - Downloaded artifact: JuliaMono + Downloading artifact: JuliaMono + Downloading artifact: JuliaMono "/home/simeon/.julia/artifacts/6c460cf2eccecd24499618112adbbe7e403fa1ee" julia> artifact"JuliaMono" "/home/simeon/.julia/artifacts/6c460cf2eccecd24499618112adbbe7e403fa1ee" julia> run(`ls $ans`); -JuliaMono-Black.ttf JuliaMono-Bold.ttf JuliaMono-Light.ttf JuliaMono-RegularLatin.ttf LICENSE -JuliaMono-BoldLatin.ttf JuliaMono-ExtraBold.ttf JuliaMono-Medium.ttf JuliaMono-Regular.ttf +JuliaMono-Black.ttf +JuliaMono-BoldLatin.ttf +JuliaMono-Bold.ttf +JuliaMono-ExtraBold.ttf +JuliaMono-Light.ttf +JuliaMono-Medium.ttf +JuliaMono-RegularLatin.ttf +JuliaMono-Regular.ttf +LICENSE ``` ### Archive a directory and upload it to gist @@ -61,34 +68,24 @@ julia> gist = upload_to_gist(artifact_id) - Creating gist... ✓ Created gist Cloning into '.'... -remote: Enumerating objects: 3, done. -remote: Counting objects: 100% (3/3), done. -remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 -Receiving objects: 100% (3/3), done. Switched to a new branch '__tmp__' -[__tmp__ (root-commit) f5a58a9] Initial commit -Switched to branch 'master' -Your branch is up to date with 'origin/master'. -HEAD is now at f5a58a9 Initial commit -[master 44dfe9a] Add files +[__tmp__ (root-commit) a1c4820] Initial commit +Switched to branch 'main' +Your branch is up to date with 'origin/main'. +HEAD is now at a1c4820 Initial commit +[main 2b03e65] Add files 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 538e83d637ab07ada6d841aa2454e0d5af4e52b3.tar.gz -Counting objects: 5, done. -Delta compression using up to 128 threads. -Compressing objects: 100% (4/4), done. -Writing objects: 100% (5/5), 455 bytes | 455.00 KiB/s, done. -Total 5 (delta 1), reused 0 (delta 0) -remote: Resolving deltas: 100% (1/1), done. -To gist.github.com:a9ceed430ff970412fc6606ef1b84b6a - + 2668e40...44dfe9a master -> master (forced update) +To gist.github.com:4e2e8dacc2179149b047d6f60885389e + + 5b04880...2b03e65 main -> main (forced update) upload_to_gist(SHA1("538e83d637ab07ada6d841aa2454e0d5af4e52b3")) → [538e83d637ab07ada6d841aa2454e0d5af4e52b3] git-tree-sha1 = "538e83d637ab07ada6d841aa2454e0d5af4e52b3" [[538e83d637ab07ada6d841aa2454e0d5af4e52b3.download]] - sha256 = "a530e9f7e371eeea4aa4fbce83a00ed32233b7766314670b1c0779eb46a7b68d" - url = "https://gist.github.com/tkf/a9ceed430ff970412fc6606ef1b84b6a/raw/538e83d637ab07ada6d841aa2454e0d5af4e52b3.tar.gz" + sha256 = "5f25c71dbebe1c7eeda5b2480360e5815ec530c22f27d1e7c4f87d73aac4aeb9" + url = "https://gist.github.com/simeonschaub/4e2e8dacc2179149b047d6f60885389e/raw/538e83d637ab07ada6d841aa2454e0d5af4e52b3.tar.gz" ``` You can copy-and-paste the printed artifact fragment into your `Artifacts.toml` diff --git a/docs/Manifest.toml b/docs/Manifest.toml index 6799033..4b218fd 100644 --- a/docs/Manifest.toml +++ b/docs/Manifest.toml @@ -1,240 +1,260 @@ # This file is machine-generated - editing it directly is not advised -[[ArgTools]] +julia_version = "1.7.3" +manifest_format = "2.0" + +[[deps.ANSIColoredPrinters]] +git-tree-sha1 = "574baf8110975760d391c710b6341da1afa48d8c" +uuid = "a4c015fc-c6ff-483c-b24f-f7ea428134e9" +version = "0.0.1" + +[[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -[[ArtifactUtils]] +[[deps.ArtifactUtils]] deps = ["Downloads", "Git", "HTTP", "Pkg", "ProgressLogging", "SHA", "TOML", "gh_cli_jll"] path = ".." uuid = "8b73e784-e7d8-4ea5-973d-377fed4e3bce" -version = "0.2.0" +version = "0.2.1" -[[Artifacts]] +[[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -[[Base64]] +[[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -[[Dates]] +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" + +[[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -[[DocStringExtensions]] -deps = ["LibGit2", "Markdown", "Pkg", "Test"] -git-tree-sha1 = "50ddf44c53698f5e784bbebb3f4b21c5807401b1" +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "5158c2b41018c5f7eb1470d558127ac274eca0c9" uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.8.3" +version = "0.9.1" -[[Documenter]] -deps = ["Base64", "Dates", "DocStringExtensions", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"] -git-tree-sha1 = "fb1ff838470573adc15c71ba79f8d31328f035da" +[[deps.Documenter]] +deps = ["ANSIColoredPrinters", "Base64", "Dates", "DocStringExtensions", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"] +git-tree-sha1 = "ee945ed10767de73cf8b610951b98228cb65af80" uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -version = "0.25.2" +version = "0.27.22" -[[Downloads]] -deps = ["ArgTools", "LibCURL", "NetworkOptions"] +[[deps.Downloads]] +deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -[[Expat_jll]] +[[deps.Expat_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "b3bfd02e98aedfa5cf885665493c5598c350cd2f" +git-tree-sha1 = "bad72f730e9e91c08d9427d5e8db95478a3c323d" uuid = "2e619515-83b5-522b-bb60-26c02a35a201" -version = "2.2.10+0" +version = "2.4.8+0" + +[[deps.FileWatching]] +uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" -[[Gettext_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"] -git-tree-sha1 = "8c14294a079216000a0bdca5ec5a447f073ddc9d" +[[deps.Gettext_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "9b02998aba7bf074d14de89f9d37ca24a1a0b046" uuid = "78b55507-aeef-58d4-861c-77aaff3498b1" -version = "0.20.1+7" +version = "0.21.0+0" -[[Git]] +[[deps.Git]] deps = ["Git_jll"] git-tree-sha1 = "d7bffc3fe097e9589145493c08c41297b457e5d0" uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2" version = "1.2.1" -[[Git_jll]] +[[deps.Git_jll]] deps = ["Artifacts", "Expat_jll", "Gettext_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Pkg", "Zlib_jll"] -git-tree-sha1 = "33be385f3432a5a5b7f6965af9592d4407f3167f" +git-tree-sha1 = "6e93d42b97978709e9c941fa43d0f01701f0d290" uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb" -version = "2.31.0+0" +version = "2.34.1+0" -[[HTTP]] +[[deps.HTTP]] deps = ["Base64", "Dates", "IniFile", "Logging", "MbedTLS", "NetworkOptions", "Sockets", "URIs"] git-tree-sha1 = "0fa77022fe4b511826b39c894c90daf5fce3334a" uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" version = "0.9.17" -[[IniFile]] -deps = ["Test"] -git-tree-sha1 = "098e4d2c533924c921f9f9847274f2ad89e018b8" +[[deps.IOCapture]] +deps = ["Logging", "Random"] +git-tree-sha1 = "f7be53659ab06ddc986428d3a9dcc95f6fa6705a" +uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" +version = "0.2.2" + +[[deps.IniFile]] +git-tree-sha1 = "f550e6e32074c939295eb5ea6de31849ac2c9625" uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f" -version = "0.5.0" +version = "0.5.1" -[[InteractiveUtils]] +[[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -[[JLLWrappers]] +[[deps.JLLWrappers]] deps = ["Preferences"] -git-tree-sha1 = "642a199af8b68253517b80bd3bfd17eb4e84df6e" +git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.3.0" +version = "1.4.1" -[[JSON]] +[[deps.JSON]] deps = ["Dates", "Mmap", "Parsers", "Unicode"] -git-tree-sha1 = "81690084b6198a2e1da36fcfda16eeca9f9f24e4" +git-tree-sha1 = "3c837543ddb02250ef42f4738347454f95079d4e" uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -version = "0.21.1" +version = "0.21.3" -[[LibCURL]] +[[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -[[LibCURL_jll]] +[[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -[[LibGit2]] +[[deps.LibGit2]] deps = ["Base64", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -[[LibSSH2_jll]] +[[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -[[Libdl]] +[[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -[[Libiconv_jll]] +[[deps.Libiconv_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "42b62845d70a619f063a7da093d995ec8e15e778" uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" version = "1.16.1+1" -[[Logging]] +[[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -[[Markdown]] +[[deps.Markdown]] deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -[[MbedTLS]] -deps = ["Dates", "MbedTLS_jll", "Random", "Sockets"] -git-tree-sha1 = "1c38e51c3d08ef2278062ebceade0e46cefc96fe" +[[deps.MbedTLS]] +deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "Random", "Sockets"] +git-tree-sha1 = "d9ab10da9de748859a7780338e1d6566993d1f25" uuid = "739be429-bea8-5141-9913-cc70e7f3736d" -version = "1.0.3" +version = "1.1.3" -[[MbedTLS_jll]] +[[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -[[Mmap]] +[[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" -[[MozillaCACerts_jll]] +[[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -[[NetworkOptions]] +[[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -[[OpenSSL_jll]] +[[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "15003dcb7d8db3c6c857fda14891a539a8f2705a" +git-tree-sha1 = "e60321e3f2616584ff98f0a4f18d98ae6f89bbb3" uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "1.1.10+0" +version = "1.1.17+0" -[[PCRE2_jll]] +[[deps.PCRE2_jll]] deps = ["Artifacts", "Libdl"] uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" -[[Parsers]] -deps = ["Dates", "Test"] -git-tree-sha1 = "8077624b3c450b15c087944363606a6ba12f925e" +[[deps.Parsers]] +deps = ["Dates"] +git-tree-sha1 = "0044b23da09b5608b4ecacb4e5e6c6332f833a7e" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "1.0.10" +version = "2.3.2" -[[Pkg]] +[[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -[[Preferences]] +[[deps.Preferences]] deps = ["TOML"] -git-tree-sha1 = "00cfd92944ca9c760982747e9a1d0d5d86ab1e5a" +git-tree-sha1 = "47e5f437cc0e7ef2ce8406ce1e7e24d44915f88d" uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.2.2" +version = "1.3.0" -[[Printf]] +[[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -[[ProgressLogging]] +[[deps.ProgressLogging]] deps = ["Logging", "SHA", "UUIDs"] git-tree-sha1 = "80d919dee55b9c50e8d9e2da5eeafff3fe58b539" uuid = "33c8b6b6-d38a-422a-b730-caa89a2f386c" version = "0.1.4" -[[REPL]] +[[deps.REPL]] deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" -[[Random]] -deps = ["Serialization"] +[[deps.Random]] +deps = ["SHA", "Serialization"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -[[SHA]] +[[deps.SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -[[Serialization]] +[[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -[[Sockets]] +[[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" -[[TOML]] +[[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -[[Tar]] +[[deps.Tar]] deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -[[Test]] +[[deps.Test]] deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -[[URIs]] -git-tree-sha1 = "97bbe755a53fe859669cd907f2d96aee8d2c1355" +[[deps.URIs]] +git-tree-sha1 = "e59ecc5a41b000fa94423a578d29290c7266fc10" uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" -version = "1.3.0" +version = "1.4.0" -[[UUIDs]] +[[deps.UUIDs]] deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -[[Unicode]] +[[deps.Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -[[XML2_jll]] +[[deps.XML2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"] -git-tree-sha1 = "1acf5bdf07aa0907e0a37d3718bb88d4b687b74a" +git-tree-sha1 = "58443b63fb7e465a8a7210828c91c08b92132dff" uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" -version = "2.9.12+0" +version = "2.9.14+0" -[[Zlib_jll]] +[[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -[[gh_cli_jll]] +[[deps.gh_cli_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "ffd2da4dfa88bbdc1f11694cebb3da96a888a275" uuid = "5d31d589-30fb-542f-b82d-10325e863e38" version = "2.2.0+0" -[[nghttp2_jll]] +[[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -[[p7zip_jll]] +[[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" diff --git a/src/ArtifactUtils.jl b/src/ArtifactUtils.jl index b07f050..9a2fa80 100644 --- a/src/ArtifactUtils.jl +++ b/src/ArtifactUtils.jl @@ -1,5 +1,10 @@ module ArtifactUtils +@doc let path = joinpath(dirname(@__DIR__), "README.md") + include_dependency(path) + replace(read(path, String), "```julia" => "```jldoctest a") +end ArtifactUtils + import Git import HTTP import TOML diff --git a/test/runtests.jl b/test/runtests.jl index 8e0d6d9..02dbb0f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -144,3 +144,34 @@ end @test all(==(1), hits) end end + +using Documenter, gh_cli_jll +if haskey(ENV, "GITHUB_TOKEN") + @testset "Doctests" begin + doctestfilters=[ + r"(/home/simeon)", + r"\[__tmp__ \(root\-commit\)(.*)main -> main \(forced update\)"s, + r"sha256 = \"(.*)\"", + r"url = \"(.*)\"", + ] + dir = mktempdir() + source = joinpath(dir, "src") + mkdir(source) + makedocs(; + root = dir, + source = source, + sitename = "", + doctest = :only, + modules = [ArtifactUtils], + doctestfilters, + ) + url = TOML.parsefile(joinpath(dir, "Artifacts.toml"))["hello_world"]["download"][]["url"] + @show url + gh() do cmd + run(`$cmd gist delete $url`) + end + rm(dir; recursive=true) + end +else + @warn "skipping doctests because `GITHUB_TOKEN` was not specified" +end