@@ -15,23 +15,22 @@ jobs:
1515 fail-fast : false
1616 matrix :
1717 julia-version :
18- - " 1.6 "
18+ - " lts "
1919 - " 1"
20- - " nightly"
2120 os :
2221 - ubuntu-latest
2322 - macos-latest
2423 - windows-latest
2524 julia-arch :
2625 - x64
2726 steps :
28- - uses : actions/checkout@v2
29- - uses : julia-actions/setup-julia@v1
27+ - uses : actions/checkout@v6
28+ - uses : julia-actions/setup-julia@v2
3029 with :
3130 version : ${{ matrix.julia-version }}
3231 arch : ${{ matrix.julia-arch }}
3332 - name : Cache artifacts
34- uses : actions/cache@v2
33+ uses : julia- actions/cache@v2
3534 env :
3635 cache-name : cache-artifacts
3736 with :
@@ -54,67 +53,17 @@ jobs:
5453 runs-on : ubuntu-latest
5554 steps :
5655 - uses : actions/checkout@v2
57- - uses : julia-actions/setup-julia@v1
56+ - uses : julia-actions/setup-julia@v2
5857 with :
5958 version : ' 1'
60- - run : |
61- julia -e '
62- function set_environment_variable(name::AbstractString, value::AbstractString)
63- github_env = ENV["GITHUB_ENV"]
64- touch(github_env)
65- open(github_env, "a") do io
66- println(io, "$(name)=$(value)")
67- end
68- end
69- event_name = "${{ github.event_name }}"
70- if event_name == "pull_request"
71- base_ref = "${{ github.base_ref }}"
72- head_ref = "${{ github.head_ref }}"
73- base_repository = "${{ github.repository }}"
74- head_repository = "${{ github.event.pull_request.head.repo.full_name }}"
75- build_docs = (base_ref == "master") && (head_ref == "dev") && (base_repository == head_repository)
76- elseif event_name == "push"
77- ref = "${{ github.ref }}"
78- build_docs = (ref == "refs/heads/master") || (startswith(ref, "refs/tags/"))
79- elseif event_name == "schedule"
80- build_docs = ref == "refs/heads/master"
81- elseif event_name == "workflow_dispatch"
82- build_docs = ref == "refs/heads/master"
83- else
84- build_docs = false
85- end
86- if build_docs
87- @info("We will build the docs")
88- set_environment_variable("BUILD_DOCS", "true")
89- else
90- @info("We will NOT build the docs")
91- set_environment_variable("BUILD_DOCS", "false")
92- end'
93- - run : |
94- julia --project=docs -e '
95- if ENV["BUILD_DOCS"] == "true"
96- using Pkg
97- Pkg.develop(PackageSpec(path=pwd()))
98- Pkg.instantiate()
99- end'
100- - run : |
101- julia --project=docs -e '
102- if ENV["BUILD_DOCS"] == "true"
103- using Documenter: doctest
104- using OpenML
105- @info "attempting to run the doctests"
106- doctest(OpenML)
107- else
108- @info "skipping the doctests"
109- end'
110- - run : julia --project=docs -e '
111- if ENV["BUILD_DOCS"] == "true"
112- @info "attempting to build the docs"
113- run(`julia --project=docs docs/make.jl`)
114- @info "successfully built the docs"
115- else
116- @info "skipping the docs build"
117- end'
59+ - uses : julia-actions/julia-buildpkg@latest
60+ - uses : julia-actions/julia-docdeploy@latest
11861 env :
11962 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
12063 DOCUMENTER_KEY : ${{ secrets.DOCUMENTER_KEY }}
64+ - run : |
65+ julia --project=docs -e '
66+ using Documenter: DocMeta, doctest
67+ using OpenML
68+ DocMeta.setdocmeta!(OpenML, :DocTestSetup, :(using OpenML); recursive=true)
69+ doctest(OpenML)'
0 commit comments