feat: support carryforward flags on parallel finish - #762
Merged
Conversation
Split the oversized cli_test.py into a per-subcommand tests/cli/ package and the CI-detection cases out of resolve_test.py so both stay under the max-module-lines limit as they grow. changelog: ``coveralls finish`` now accepts ``--carryforward`` (also ``COVERALLS_CARRYFORWARD`` or the ``carryforward`` config-file key) to carry forward coverage flags for jobs missing from a parallel build.
…clude Address review of the carryforward change: - coveralls_kwargs no longer hand-mirrors the CLI option set; it derives the forwarded override keys from _make_coveralls itself, so the baseline cannot silently drift as options are added or removed. - Move the shared cli test support out of helpers.py into conftest.py, which name-tests-test exempts, so the lint exclude added earlier is reverted.
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.
Closes #382
What
Adds support for Coveralls' carryforward flags on the parallel-build finish webhook. When a parallel build is missing jobs (common in monorepos), Coveralls can carry forward the coverage for the named flags from a previous build.
How to use
Details
Config.carryforwardfield. It is a client-behaviour field (webhook/finish-only), deliberately kept out ofPAYLOAD_FIELDSso it never leaks into the/jobspayload.parallel_finish()addscarryforwardas a top-level key in the/webhookpayload (matchingcoverallsapp/coverage-reporter), omitted when empty/unset.--carryforwardis exposed only on thefinishsubcommand.COVERALLS_CARRYFORWARDand config-file keycarryforwardsupported via the standard resolution chain.Test-file split
tests/cli_test.pyandtests/api/resolve_test.pywere already at the--max-module-lines=500pylint limit, so any addition trippedtoo-many-lines. To make room (and give headroom for future growth):tests/cli_test.py→ a per-subcommandtests/cli/package (debug_test.py,finish_test.py,save_test.py,upload_test.py,submit_test.py) with shared constants/helpers intests/cli/helpers.py.tests/api/resolve_test.pyintotests/api/resolve_ci_test.py.No tests were removed; the full suite still reports the same count (185 passed, 1 skipped). A narrow
name-tests-testexclude was added for the non-testhelpers.pysupport module.