ci(python): run fable-library-py native tests in build workflow#4820
Merged
Conversation
The src/fable-library-py/tests suite (fable_library.core, .union, .util) ran only in publish-pypi.yml, where it was never listed in the `release` job's `needs`. It therefore gated nothing: a failure was invisible until release time and did not stop the publish. It also held 9 runners that the wheel jobs were queuing behind. Move it to build.yml so it runs on every push/PR to main, keeping the same [ubuntu, windows, macos] x [3.12, 3.13, 3.14] matrix. The job needs no .NET and no F# transpilation: these tests import only hand-written, tracked sources, not generated ones. Dropping the artifact download also removes the duplicate extension build (maturin-action and `maturin develop --release` both ran). uv calls pass --frozen so a stale lock fails instead of being silently rewritten. 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
src/fable-library-py/testssuite (247 tests coveringfable_library.core,.union,.util— i.e. the Rust extension) ran only inpublish-pypi.yml. But that job was never listed in thereleasejob'sneeds:So it gated nothing. A failure was invisible until release time and did not stop the publish. It also occupied 9 runners that the wheel jobs were queuing behind, so it cost release wall-clock without buying release safety.
It was also the only place macOS and these native tests were covered at all —
build.yml'sbuild-pythonmatrix is[ubuntu, windows]and runs./build.sh test python, which pytests the transpiled suite intemp/tests/py, not these.Change
Move the suite to
build.ymlastest-fable-library-py, keeping the identical[ubuntu, windows, macos] × [3.12, 3.13, 3.14]matrix so no coverage is dropped. It now runs on every push/PR tomain, where a break is cheap to catch.The job is substantially cheaper than the old one:
build.sh fable-library --python. These tests import only hand-written, git-tracked sources, never generated ones — so the transpile step and the artifact download are both unnecessary.PyO3/maturin-actionand thenuv run maturin develop --release, building it twice.uvcalls pass--frozen(perAGENTS.md), so a staleuv.lockfails loudly rather than being silently rewritten.publish-pypi.ymlloses thetestjob, with a comment recording why.Verification
Both workflows parse, and
testwas not referenced by anyneeds, so no dangling edges. Suite runs clean locally:Real confirmation is this PR's own CI — the new job exercising all 9 matrix legs is the thing to watch.
🤖 Generated with Claude Code