Skip to content

CI - IMPROVEMENT - Gate the Julia test suite on Julia changes, and general workflow cleanup - #344

Merged
matt-pharr merged 5 commits into
developfrom
claude/julia-tests-github-workflows-9axlpa
Jul 30, 2026
Merged

CI - IMPROVEMENT - Gate the Julia test suite on Julia changes, and general workflow cleanup#344
matt-pharr merged 5 commits into
developfrom
claude/julia-tests-github-workflows-9axlpa

Conversation

@matt-pharr

@matt-pharr matt-pharr commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Only changed github tests. Changes:

  1. Make it so that the julia tests only run on PRs that change julia code in src/ and tests/
  2. Added formatter test. Currently disabled, plan is to enable it once we reformat the code in the repository and start enforcing formatting standards.
  3. Made superseded tests cancel, in case someone pushes two commits back to back, so we don't waste monthly limited container time
  4. Added reasonable timeouts to all the jobs
  5. Updated to latest checkout and julia test workflow packages

Claude and others added 5 commits July 30, 2026 14:47
…lia code

The full suite takes 15-25 minutes per matrix leg and was running on every
pull request, including docs- and CLAUDE.md-only changes. A `changes` job now
inspects the PR's file list and gates the matrix on whether the change touches
anything test/runtests.jl actually reads: any .jl file outside docs/,
benchmarks/ and regression-harness/, plus Project.toml, test/, examples/ and
this workflow. Pushes to main/develop still always run the suite.

A `Tests` aggregate job runs unconditionally and reports success when the
suite is legitimately skipped, so it can serve as the required status check
without blocking merges on skipped runs.

Also across the workflows:
- Fix the copilot-setup-steps triggers, which referenced a .yml file that does
  not exist and had a stray space in the pull_request path, so neither the
  push nor the pull_request trigger ever matched.
- Add a concurrency group to the test workflow so superseded PR runs are
  cancelled instead of running two full matrices in parallel.
- Add timeout-minutes to every job; jobs previously inherited the 6-hour
  default, so a hung test would burn a full day of runner minutes.
- Standardize on actions/checkout@v6 and julia-actions/cache@v3 everywhere.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019tFBCa5iBXyb7xp8LxqBJx
… now

Adds a Format and Hygiene workflow that runs the repository's own pre-commit
suite (JuliaFormatter plus the file-hygiene hooks) so contributors who have not
run `pre-commit install` are still caught. It is wired to workflow_dispatch
only: the repository has pre-existing formatting drift that must be cleaned up
first, which is out of scope here. Running it manually from the Actions tab
shows the current damage; uncommenting the pull_request trigger enables it as
a gate.

The julia-formatter hook is `language: system`, so it shells out to whatever
JuliaFormatter is in the default depot environment rather than the one implied
by the pinned hook revision. The workflow therefore installs JuliaFormatter
v1.0.62 explicitly, matching the rev in .pre-commit-config.yaml, so CI and
local runs agree.

Also disables coverage instrumentation in the test job. julia-runtest enables
it by default, but nothing consumes the .cov files: they are gitignored and
never uploaded. Instrumenting compute-heavy numerical code for output that is
discarded is pure cost.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019tFBCa5iBXyb7xp8LxqBJx
The detector wrote its decision only to the run summary, so the job log showed
the script and nothing else. That makes "why did the suite run?" unanswerable
from the place people look first. Echo the verdict and the matched files to
stdout as well, and list the files considered when the suite is skipped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019tFBCa5iBXyb7xp8LxqBJx
…aths

The detector matched any .jl file outside a denylist of docs, benchmarks and
regression-harness. That meant new untested Julia triggered a full run unless
someone remembered to extend the denylist: a benchmark, a root-level script,
or a future tools/ directory all ran the suite for nothing.

Replace it with an allowlist of what test/runtests.jl actually exercises:
src/, test/, examples/, Project.toml, and this workflow. Untested code is now
excluded by default rather than by maintenance.

Kept as directory prefixes rather than *.jl: src/ForcingTerms/coil_geometries
holds the .dat coil geometries the coil tests load, and test/test_data holds 28
non-Julia fixtures. Matching only *.jl would skip runs when either changes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019tFBCa5iBXyb7xp8LxqBJx
@matt-pharr
matt-pharr requested a review from logan-nc July 30, 2026 15:13
@matt-pharr
matt-pharr enabled auto-merge July 30, 2026 15:13
@matt-pharr
matt-pharr disabled auto-merge July 30, 2026 15:13
@matt-pharr
matt-pharr enabled auto-merge July 30, 2026 15:14
@matt-pharr
matt-pharr requested a review from jhalpern30 July 30, 2026 15:15

@jhalpern30 jhalpern30 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

These all look like great changes - especially the auto-formatter check, I've had too many PRs where I change one line on my end but the entire file gets diffed

@matt-pharr
matt-pharr merged commit 908099e into develop Jul 30, 2026
8 checks passed
@matt-pharr
matt-pharr deleted the claude/julia-tests-github-workflows-9axlpa branch July 30, 2026 15:29
@logan-nc

Copy link
Copy Markdown
Collaborator

❤️

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.

3 participants