Skip to content

Commit 8fa221d

Browse files
authored
ci: update doctest config (#120)
1 parent 346b359 commit 8fa221d

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

.github/workflows/CI.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,29 @@ jobs:
6363
files: lcov.info
6464
doctests:
6565
runs-on: ubuntu-latest
66-
timeout-minutes: 60
66+
permissions:
67+
# needed to allow julia-actions/cache to proactively delete old caches that it has created
68+
actions: write
69+
contents: write
70+
statuses: write
6771
steps:
6872
- uses: actions/checkout@v4
69-
with:
70-
persist-credentials: false
71-
- uses: julia-actions/setup-julia@v1
73+
- uses: julia-actions/setup-julia@v2
7274
with:
7375
version: 'nightly'
76+
- uses: julia-actions/cache@v2
7477
- run: julia --color=yes .ci/test_and_change_uuid.jl
75-
- run: julia --project=docs --color=yes -e 'using Pkg; Pkg.instantiate()'
76-
- run: julia --project=docs --color=yes -e 'using Pkg; Pkg.develop(PackageSpec(path = pwd()))'
78+
- name: Configure doc environment
79+
shell: julia --project=docs --color=yes {0}
80+
run: |
81+
using Pkg
82+
Pkg.develop(PackageSpec(path=pwd()))
83+
Pkg.instantiate()
84+
- uses: julia-actions/julia-buildpkg@v1
7785
- name: Run doctests
78-
run: julia --project=docs --color=yes -e 'import SHA; import Documenter; Documenter.doctest(SHA)'
86+
shell: julia --project=docs --color=yes {0}
87+
run: |
88+
using Documenter: DocMeta, doctest
89+
using SHA
90+
DocMeta.setdocmeta!(SHA, :DocTestSetup, :(using SHA); recursive=true)
91+
doctest(SHA)

0 commit comments

Comments
 (0)