Checks
Running previous version's tests on current version's code
One of the main risks with automatic semantic versioning is the risk
accidentally mark a breaking change as a minor or patch release. Unfortunately,
it is quite easy to forget to include the BREAKING CHANGE:
marker. Stephan
Bönnemann therefore suggests
running the tests of the previous version against a new release candidate: If
the tests from the previous version fail on the new release candidate, then
that release candidate is likely a breaking change and should be a major
version.
This is currently only implemented for tox:
RunPreviousVersionsTestsTox
Bases: VersionEstimator
Source code in /home/docs/checkouts/readthedocs.org/user_builds/semv/envs/latest/lib/python3.11/site-packages/semv/hooks.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
|
__init__(testenv, buildenv='build')
Run tests from previous version on new version
This is an attempt to automatically detect breaking versions. If the tests from the previous version fail, then we can assume that the version most likely contains a breaking change.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
testenv |
Union[str, List[str]]
|
Name of the environment(s) that contain the actual tests to run. |
required |
buildenv |
str
|
To build the current version's package, we run this tox
environment. It should create a wheel file in the
|
'build'
|
Source code in /home/docs/checkouts/readthedocs.org/user_builds/semv/envs/latest/lib/python3.11/site-packages/semv/hooks.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
|