From 5d6ef9520e0af5ef31bcbf58799a25389a5d6d91 Mon Sep 17 00:00:00 2001 From: Chengyu HAN Date: Sat, 14 Dec 2024 13:45:50 +0800 Subject: [PATCH 1/4] ci: build doc with latest julia release --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2e68f93..c249d61 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -38,7 +38,7 @@ jobs: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 with: - version: '1.9' + version: '1' - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-docdeploy@v1 From b87caff1fa11c456fdd0b2a79d6d531bd2ba649b Mon Sep 17 00:00:00 2001 From: Chengyu HAN Date: Wed, 1 Jan 2025 11:35:36 +0800 Subject: [PATCH 2/4] ci: give permissions for cache-action --- .github/workflows/CI.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c249d61..296bf8e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -34,6 +34,11 @@ jobs: docs: name: Documentation runs-on: ubuntu-latest + permissions: + # needed to allow julia-actions/cache to proactively delete old caches that it has created + actions: write + contents: write + statuses: write steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 From 63918817df24ce1b580882b540eaf28cd5c60d47 Mon Sep 17 00:00:00 2001 From: Chengyu HAN Date: Wed, 1 Jan 2025 11:35:53 +0800 Subject: [PATCH 3/4] ci: build with latest commit --- .github/workflows/CI.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 296bf8e..c7b4e70 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -45,6 +45,12 @@ jobs: with: version: '1' - uses: julia-actions/cache@v2 + - name: Configure doc environment + shell: julia --project=docs --color=yes {0} + run: | + using Pkg + Pkg.develop(PackageSpec(path=pwd())) + Pkg.instantiate() - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-docdeploy@v1 env: From 37be51ba72f0e9b4d3e7351183d6b1a5fce27d0e Mon Sep 17 00:00:00 2001 From: Chengyu HAN Date: Wed, 1 Jan 2025 11:36:04 +0800 Subject: [PATCH 4/4] ci: run doctests --- .github/workflows/CI.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c7b4e70..88be50c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -52,6 +52,13 @@ jobs: Pkg.develop(PackageSpec(path=pwd())) Pkg.instantiate() - uses: julia-actions/julia-buildpkg@v1 + - name: Run doctests + shell: julia --project=docs --color=yes {0} + run: | + using Documenter: DocMeta, doctest + using Primes + DocMeta.setdocmeta!(Primes, :DocTestSetup, :(using Primes); recursive=true) + doctest(Primes) - uses: julia-actions/julia-docdeploy@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}