-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
RFC: Streamlining pytest's git workflow #6571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,6 +57,4 @@ notifications: | |
| branches: | ||
| only: | ||
| - master | ||
| - features | ||
| - 4.6-maintenance | ||
| - /^\d+(\.\d+)+$/ | ||
| - /^\d+\.\d+\.x$/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,40 +10,38 @@ taking a lot of time to make a new one. | |
| pytest releases must be prepared on **Linux** because the docs and examples expect | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we might rename this to
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for reminding me, I'll add it to this PR. |
||
| to be executed on that platform. | ||
|
|
||
| #. Create a branch ``release-X.Y.Z`` with the version for the release. | ||
| To release a version ``MAJOR.MINOR.PATCH``, follow these steps: | ||
|
|
||
| * **maintenance releases**: from ``4.6-maintenance``; | ||
| #. For major and minor releases, create a new branch ``MAJOR.MINOR.x`` from the | ||
| latest ``master`` and push it to the ``pytest-dev/pytest`` repo. | ||
|
|
||
| * **patch releases**: from the latest ``master``; | ||
| #. Create a branch ``release-MAJOR.MINOR.PATCH`` from the ``MAJOR.MINOR.x`` branch. | ||
|
|
||
| * **minor releases**: from the latest ``features``; then merge with the latest ``master``; | ||
|
|
||
| Ensure your are in a clean work tree. | ||
| Ensure your are updated and in a clean working tree. | ||
|
|
||
| #. Using ``tox``, generate docs, changelog, announcements:: | ||
|
|
||
| $ tox -e release -- <VERSION> | ||
| $ tox -e release -- MAJOR.MINOR.PATCH | ||
|
|
||
| This will generate a commit with all the changes ready for pushing. | ||
|
|
||
| #. Open a PR for this branch targeting ``master`` (or ``4.6-maintenance`` for | ||
| maintenance releases). | ||
| #. Open a PR for the ``release-MAJOR.MINOR.PATCH`` branch targeting ``MAJOR.MINOR.x``. | ||
|
|
||
| #. After all tests pass and the PR has been approved, publish to PyPI by pushing the tag:: | ||
| #. After all tests pass and the PR has been approved, tag the release commit | ||
| in the ``MAJOR.MINOR.x`` branch and push it. This will publish to PyPI:: | ||
|
|
||
| git tag <VERSION> | ||
| git push git@github.com:pytest-dev/pytest.git <VERSION> | ||
| git tag MAJOR.MINOR.PATCH | ||
| git push git@github.com:pytest-dev/pytest.git MAJOR.MINOR.PATCH | ||
|
|
||
| Wait for the deploy to complete, then make sure it is `available on PyPI <https://pypi.org/project/pytest>`_. | ||
|
|
||
| #. Merge the PR. | ||
|
|
||
| #. If this is a maintenance release, cherry-pick the CHANGELOG / announce | ||
| files to the ``master`` branch:: | ||
| #. Cherry-pick the CHANGELOG / announce files to the ``master`` branch:: | ||
|
|
||
| git fetch --all --prune | ||
| git checkout origin/master -b cherry-pick-maintenance-release | ||
| git cherry-pick --no-commit -m1 origin/4.6-maintenance | ||
| git checkout origin/master -b cherry-pick-release | ||
| git cherry-pick --no-commit -m1 origin/MAJOR.MINOR.x | ||
| git checkout origin/master -- changelog | ||
| git commit # no arguments | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One thing that is not clear for me from the docs: do we keep Currently a version goes unsupported when the next minor/major is released: so for example the I think we should delete
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My inclination is to keep the branches around forever, for the following reasons, however I don't feel strongly about this. If you prefer to delete, I can update the text - let me know.
Also, I don't really think that people will construe the existence of a branch to mean it's still supported, though maybe I'll be proven wrong about it... Confusion/fat finger might happen though.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I don't feel strongly about it either, let's see if others chime in. If nobody does, let's go with keeping the branches around given you are the author of the PR. 👍
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it becomes a problem we can always start deleting then! |
||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.