diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4e31f9f0..13a3ef30 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -13,6 +13,11 @@ concurrency: # Cancel intermediate builds, but only if it is a pull request build. cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} +# needed to allow julia-actions/cache to delete old caches that it has created +permissions: + actions: write + contents: read + jobs: test: name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} @@ -22,6 +27,7 @@ jobs: matrix: version: - '1.6' + - 'lts' - '1' # - 'nightly' os: @@ -48,6 +54,17 @@ jobs: - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 + - name: "Run doctests" + if: ${{ matrix.version == 'lts' }} # only run in one Julia version due to fluctuations + run: | + julia --project=docs --color=yes --code-coverage -e ' + using Pkg + Pkg.develop(PackageSpec(path=pwd())) + Pkg.instantiate() + using Documenter + using DataStructures + DocMeta.setdocmeta!(DataStructures, :DocTestSetup, :(using DataStructures); recursive=true) + doctest(DataStructures)' - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v5 with: diff --git a/.github/workflows/Documenter.yml b/.github/workflows/Documenter.yml index 5f7ba8b7..c151bf89 100644 --- a/.github/workflows/Documenter.yml +++ b/.github/workflows/Documenter.yml @@ -5,11 +5,13 @@ on: tags: [v*] pull_request: +permissions: + actions: write # needed to allow julia-actions/cache to delete old caches that it has created + contents: write # needed to allow deploying docs + statuses: write + jobs: Documenter: - permissions: - contents: write - statuses: write name: Documentation runs-on: ubuntu-latest steps: @@ -18,7 +20,7 @@ jobs: with: version: '1' # replace this with whatever version you need show-versioninfo: true # this causes versioninfo to be printed to the action log - - uses: julia-actions/cache@v2 # cache using https://github.com/julia-actions/cache + - uses: julia-actions/cache@v2 # cache using https://github.com/julia-actions/cache - uses: julia-actions/julia-buildpkg@v1 # if package requires Pkg.build() - uses: julia-actions/julia-docdeploy@v1 env: diff --git a/docs/make.jl b/docs/make.jl index 5656f41d..5425b03e 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -6,6 +6,7 @@ DocMeta.setdocmeta!(DataStructures, :DocTestSetup, :(using DataStructures); recu makedocs( sitename = "DataStructures.jl", warnonly = true, # FIXME: address all warnings and resolve them + doctest = true, pages = [ "index.md", "deque.md",