Skip to content

Update badges and CI - #247

Open
devmotion wants to merge 11 commits into
mainfrom
dw/badges
Open

devmotion wants to merge 11 commits into
mainfrom
dw/badges

Conversation

@devmotion

@devmotion devmotion commented Sep 15, 2025 •

Copy link
Copy Markdown
Member

Brings the CI setup in line with current Julia ecosystem practice, following JuliaDiff/ChainRulesCore.jl#715.

CI changes

  • Docs workspace: the root Project.toml declares docs as part of a workspace, so the package and the docs are resolved together into one Manifest. Julia versions before 1.12 ignore the table.
  • Dependabot replaces CompatHelper: adds a julia ecosystem entry for / that groups package updates into one weekly PR, covering docs/Project.toml as well. CompatHelper.yml is removed.
  • Test matrix: the shape is unchanged: the oldest supported Julia (min instead of a hardcoded 1.0) and 1, on Linux, macOS and Windows. pre replaces the separate JuliaNightly.yml workflow and runs on the same three OSes; it's allowed to fail. The hardcoded arch: x64 is dropped, so macos-latest (Apple Silicon) runs native aarch64 binaries. Julia 1.0 has no aarch64 build, so min runs on macOS-15-intel instead.
  • Caching and coverage: julia-actions/cache replaces the hand-written actions/cache setup, and the workflows get actions: write so it can prune old caches. Codecov uses codecov-action@v7 with a token and fail_ci_if_error: true.
  • Docs: moved into CI.yml as a docs job. It builds on Julia 1 and installs dependencies with Pkg.instantiate(), relying on [sources] in docs/Project.toml instead of Pkg.develop. The separate doctest(FiniteDifferences) step is dropped: the docs contain no jldoctest (or any other executed) blocks, and makedocs runs doctests anyway. Documenter.yml is removed.
  • IntegrationTest: now triggers on main instead of master, which doesn't exist. It also gets permissions, the cache and concurrency settings, and drops the redundant arch: x64. Downstream tests run in a temporary environment with both packages developed.
  • Concurrency: intermediate PR builds are cancelled.
  • Cleanup: removes .travis.yml and docs/Manifest.toml, ignores all Manifest.toml files, and fixes the README badges.

Repo settings needed

  • Add CODECOV_TOKEN as a Dependabot secret (Settings → Secrets and variables → Dependabot). Dependabot PRs can't read normal Actions secrets, and fail_ci_if_error: true would otherwise fail CI on them.
  • Update the required status checks for the new job names, and remove the JuliaNightly and Documenter checks.

Testing

  • Pkg.test() passes locally on Julia 1.13.1 and 1.6.7. On 1.6 this checks that Julia versions before 1.12 ignore the [workspace] table.
  • The docs build locally on Julia 1.13.1 with Pkg.instantiate() only.
  • The workflow files parse as valid YAML. actionlint was not run.
  • CI passes on this PR, including the Julia 1 jobs and the ChainRules, SpecialFunctions and BlockDiagonals integration tests that fail on main.

🤖 Generated with Claude Code

Comment thread .github/workflows/Documenter.yml Outdated
- uses: julia-actions/setup-julia@v2
with:
version: '1.10'
version: '1'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

locking it to a precise minor version seems good.
Because it stops doctests breaking if julia decides to change the string representation of things again

Suggested change
version: '1'
version: '1.10'

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.10 doesn't support path, IIRC at least 1.11 is needed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following up: the docs need Julia ≥ 1.11 for [sources] in docs/Project.toml, and ≥ 1.12 for the workspace. So I've kept '1'. Also, the docs build doesn't execute any code, so no output can change with the Julia version.

Comment thread .gitignore
*.jl.*.cov
*.jl.mem
/Manifest.toml
Manifest.toml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keeping the docs manifest around is useful to avoid breaking doctests if packages we use change their string represetations

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO such doctest failures should be avoided by using doctest filters or changing to more stable tests, since string representations may change even in non-breaking releases.

Co-authored-by: Frames White <me@oxinabox.net>
Comment thread .github/workflows/Documenter.yml Outdated
Comment thread .gitignore
*.jl.*.cov
*.jl.mem
/Manifest.toml
Manifest.toml

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO such doctest failures should be avoided by using doctest filters or changing to more stable tests, since string representations may change even in non-breaking releases.

Comment thread .github/workflows/CI.yml Outdated
@oxinabox

Copy link
Copy Markdown
Member

IMO such doctest failures should be avoided by using doctest filters or changing to more stable tests, since string representations may change even in non-breaking releases.

But the Manifest.toml doesn't lock to nonbreaking releases.
It locks to exact versions.

Should and is are different things.
I agree ideally the doctests should use filters etc.
But that's not what the code as written does.

devmotion and others added 3 commits October 27, 2026 16:45
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follow JuliaDiff/ChainRulesCore.jl#715:
- Replace CompatHelper with Dependabot for Julia; declare `docs` as a
  workspace project so Dependabot also updates its compat entries.
- Test `lts` and `1` on all OSes with native arch; `min`, x86 and an
  allowed-to-fail `pre` job on Linux. Drop JuliaNightly.yml.
- Move the docs build into CI.yml and drop Documenter.yml.
- IntegrationTest: trigger on `main`, add cache, permissions and
  concurrency, and run downstream tests in a temporary environment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Test min and 1 on all OSes as before, with pre replacing nightly. Drop lts and the x86 job, which fails two high-order accuracy tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devmotion

Copy link
Copy Markdown
Member Author

Fair point that a Manifest pins exact versions. In this repo, though, there's nothing for it to protect: the docs build doesn't execute any code. There are no jldoctest, @example or @repl blocks. The julia> examples in the README (which make.jl copies into index.md) are plain ```julia blocks, and the API page only uses @docs, which takes the docstrings from the package itself. So there's no output that could change with dependency versions. Only Documenter's own rendering could change, within its "1" compat bound.

With the update in this PR, docs is now part of a workspace, the setup the Pkg documentation describes for docs projects with their own dependencies. In a workspace, the package and the docs are resolved together into a single Manifest next to the root Project.toml. If we committed it, it would also pin the dependencies that tests resolve against. If we ever add doctests, I'd add filters or DocTestSetup to make them robust, rather than lock everything.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants