ci: extract inline CI python scripts into .github/scripts#107
Draft
dannywillems wants to merge 1 commit into
Draft
ci: extract inline CI python scripts into .github/scripts#107dannywillems wants to merge 1 commit into
dannywillems wants to merge 1 commit into
Conversation
The CI workflows wrote three different Python programs to ./subclass.py via heredocs and ran them inline. Move each into its own checked-in file under .github/scripts so they can be read, linted, and tested directly: - run_rpc_tests.py: subclasses rpc-tests.RPCTestHandler and runs a shard's tests (from the "RPC test" job in ci.yml). - set_rpc_test_shards.py: assigns RPC tests to shards and prints the shard matrix JSON (from the "set-rpc-tests" job in ci.yml). - check_no_ci_required.py: reads changed paths from stdin and decides whether CI can be skipped (from the "no-ci-required" job in ci-skip.yml). GitHub Actions expressions that were interpolated inside the Python are now passed through the environment instead: matrix.file_ext via EXEEXT and matrix.rpc_tests via RPC_TESTS (parsed with json.loads). The other scripts already took input from the environment or stdin, so their interfaces are unchanged. Script bodies are otherwise identical.
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.
The CI workflows wrote three different Python programs to ./subclass.py via heredocs and ran them inline. Move each into its own checked-in file under .github/scripts so they can be read, linted, and tested directly:
GitHub Actions expressions that were interpolated inside the Python are now passed through the environment instead: matrix.file_ext via EXEEXT and matrix.rpc_tests via RPC_TESTS (parsed with json.loads). The other scripts already took input from the environment or stdin, so their interfaces are unchanged. Script bodies are otherwise identical.
Closes #112.