tests.yml: set group env via shell: bash so GROUP propagates on Windows#100
Draft
ChrisRackauckas-Claude wants to merge 1 commit into
Draft
Conversation
The "Set test group env" step writes `<group-env-name>=<group>` to $GITHUB_ENV with bash syntax but declared no `shell:`, so it ran under the windows runners' default shell (PowerShell). PowerShell does not expand the bash-style "$GITHUB_ENV"; the step wrote to a file literally named $GITHUB_ENV instead of appending to the runner's environment file, so the group env var (e.g. GROUP) was silently never set on Windows. With GROUP unset, a package's runtests.jl falls back to its default group (SciMLTesting's run_tests defaults to "All"), so a matrix entry scheduled as "Core" on windows-latest actually ran every group's folder -- including groups with their own test/<Group>/Project.toml (e.g. an AD group pulling SciMLSensitivity) -- inside the main test environment. That activated a second project mid-session and upgraded already-loaded packages, producing precompile conflicts (observed in DiffEqCallbacks.jl: OrdinaryDiffEqCorePolyesterExt referencing OrdinaryDiffEqCore._polyester_batch against a stale loaded OrdinaryDiffEqCore) and a windows-only red. Linux/macOS runners default to bash and were unaffected. Add `shell: bash` so $GITHUB_ENV expands on every OS and the group is set correctly on Windows. downgrade.yml is unaffected (it sets GROUP via the step `env:` map, which is shell-independent). Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
Set test group envstep intests.ymlwrites<group-env-name>=<group>to$GITHUB_ENVusing bash$VARsyntax but declares noshell:. On windows runners the default shell is PowerShell, which does not expand"$GITHUB_ENV"the bash way — it writes to a file literally named$GITHUB_ENVrather than appending to the runner environment file. Result: the group env var (e.g.GROUP) is silently never set on Windows.With
GROUPunset, a package'sruntests.jlfalls back to its default group (SciMLTesting'srun_tests()defaults to"All"). So a matrix entry scheduled as Core on windows-latest actually ran every group folder, including groups that carry their owntest/<Group>/Project.toml(e.g. an AD group depending on SciMLSensitivity) — inside the main test environment. Activating that second project mid-session upgrades already-loaded packages and triggers precompile conflicts.Observed in SciML/DiffEqCallbacks.jl
tests / Core (julia 1|lts, windows-latest)failed with:because the Core job leaked into the
ADgroup (Activating project at ...\test\AD,OrdinaryDiffEqCore v4.3.0 [loaded: v3.33.1]) andusing SciMLSensitivityfailed to precompile against the stale loadedOrdinaryDiffEqCore. Linux/macOS Core jobs (bash default) ran only the Core folder and passed.Fix
Add
shell: bashto theSet test group envstep so$GITHUB_ENVexpands on every OS and the group is set correctly on Windows. This is the same shell the adjacent GITHUB_ENV/GITHUB_OUTPUT steps already use.downgrade.ymlis unaffected: it setsGROUPvia the runtest step'senv:map (shell-independent).This fixes Windows grouped-tests for every SciML repo that uses
grouped-tests.yml/tests.yml, not just DiffEqCallbacks.jl.v1will need to be retagged to this commit for callers pinned at@v1to pick it up.Please ignore until reviewed by @ChrisRackauckas