diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0109f73..da6639a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -39,31 +39,4 @@ jobs: - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v3 with: - files: lcov.info - docs: - name: Documentation - runs-on: ubuntu-latest - permissions: - contents: write - statuses: write - steps: - - uses: actions/checkout@v4 - - uses: julia-actions/setup-julia@v1 - with: - version: '1' - - name: Configure doc environment - run: | - julia --project=docs/ -e ' - using Pkg - Pkg.develop(PackageSpec(path=pwd())) - Pkg.instantiate()' - - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-docdeploy@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - run: | - julia --project=docs -e ' - using Documenter: DocMeta, doctest - using AbstractDifferentiation - DocMeta.setdocmeta!(AbstractDifferentiation, :DocTestSetup, :(using AbstractDifferentiation); recursive=true) - doctest(AbstractDifferentiation)' \ No newline at end of file + files: lcov.info \ No newline at end of file diff --git a/.github/workflows/Docs.yml b/.github/workflows/Docs.yml new file mode 100644 index 0000000..01a2f3b --- /dev/null +++ b/.github/workflows/Docs.yml @@ -0,0 +1,36 @@ +name: Docs + +on: + push: + branches: [master] + tags: '*' + pull_request: + +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: only if it is a pull request build. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} + +jobs: + docs: + name: Documentation + runs-on: ubuntu-latest + permissions: + contents: write + statuses: write + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v1 + with: + version: '1' + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-docdeploy@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - run: | + julia --project=docs -e ' + using Documenter: DocMeta, doctest + using AbstractDifferentiation + DocMeta.setdocmeta!(AbstractDifferentiation, :DocTestSetup, :(using AbstractDifferentiation); recursive=true) + doctest(AbstractDifferentiation)' \ No newline at end of file diff --git a/Project.toml b/Project.toml index 78e95f2..12627f8 100644 --- a/Project.toml +++ b/Project.toml @@ -29,6 +29,7 @@ AbstractDifferentiationZygoteExt = "Zygote" [compat] ChainRulesCore = "1" DiffResults = "1" +Documenter = "1" ExprTools = "0.1" FiniteDifferences = "0.12" ForwardDiff = "0.10" @@ -41,6 +42,7 @@ julia = "1.6" [extras] ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" DiffResults = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" @@ -50,4 +52,4 @@ Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [targets] -test = ["Test", "ChainRulesCore", "DiffResults", "FiniteDifferences", "ForwardDiff", "Random", "ReverseDiff", "Tracker", "Zygote"] +test = ["ChainRulesCore", "DiffResults", "Documenter", "FiniteDifferences", "ForwardDiff", "Random", "ReverseDiff", "Test", "Tracker", "Zygote"] diff --git a/test/runtests.jl b/test/runtests.jl index d79bafc..4716c57 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,7 +1,9 @@ using AbstractDifferentiation +using Documenter using Test -@testset "AbstractDifferentiation.jl" begin +@testset verbose = true "AbstractDifferentiation.jl" begin + doctest(AbstractDifferentiation) include("test_utils.jl") include("defaults.jl") include("forwarddiff.jl")