Repository navigation
ci(release): run the tag checks and the release upload from util/ scripts (#1967) - #2065
Conversation
|
GOOD TO GO at
|
|
Coverage: 91.52% (unit tier, Python 3.15,
Per-file detail: the |
|
Ready to merge at |
…ipts (#1967) Step 2 of #1967, first batch for create-release.yml: the shell its jobs repeated moves into two stdlib-only scripts, with each step's env:, if:, shell: and continue-on-error unchanged. * util/release_tags.py check: "Check the release tags name this run's commit" in github, pypi and conda; release_tags.py owner: "Check which commit the version's tag names" in version_check. Both resolve the tag through one function. * util/release_upload.py: "Upload package to GitHub Release" in pypi and conda. * workflows.rst lists both scripts, and the interpreter each runs on. tests/project/test_release_scripts_1967.py runs both against stand-in git and gh, and runs the former shell on the same cases, requiring the same status, output, $GITHUB_OUTPUT and calls. The #1634 tests now run the steps' commands, and PUBLISHING_MARKERS matches the upload script.
|
Rebased onto |
4ccea5a to
a16fe51
Compare
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
ci— changes to CI configuration files and scriptsDescription of your pull request and other information
The first batch of step 2's remainder in #1967:
create-release.yml's repeated inline shell moves intoutil/. Only therun:lines change; everyenv:,if:,shell:andcontinue-on-erroris untouched.util/release_tags.py check: replaces the three identical copies of Check the release tags name this run's commit ingithub,pypiandconda.util/release_tags.py owner: replaces Check which commit the version's tag names inversion_check. It shares the same tag lookup, so the two can't read a tag differently.util/release_upload.py: replaces the two copies of Upload package to GitHub Release inpypiandconda._actions. Each job checks out the whole tree before the step, and a test pins that.git/ghexits with its status, a signal as 128+N, a missing binary as 127, and an unset variable as 1.echowrote them.$GITHUB_OUTPUTkeys are the same, and output is flushed before every call.$pattern, including the no-match fallback.${PCAPKIT_TAGS}also glob-expanded*?[. A tag isvorconda-plus a PEP 440 version, so it never contains those characters.tests/project/test_release_scripts_1967.pyembedsmain's shell verbatim and runs it underbash -eo pipefailnext to each script, using stand-ingit/gh. It requires the same status, stdout, stderr,$GITHUB_OUTPUTand calls across 9 tag-check, 6 owner and 15 upload cases. A guard confirms those cases reach every exit path.test_release_tags_the_run_sha_1634runs the scripts.test_release_gates'PUBLISHING_MARKERSnow matchesutil/release_upload.py, so the environment gate still sees the upload.test_actions_helper_2047lists both scripts.workflows.rstgains both scripts' rows and a sentence on their interpreter.302 passed. Without the scripts, 64 tests fail.