@@ -12,7 +12,7 @@ It will explain how does the CI/CD pipeline work and how to trigger a new releas
1212
1313.. contents ::
1414 :local:
15- :depth: 3
15+ :depth: 2
1616
1717CI/CD Pipeline
1818==============
@@ -99,6 +99,79 @@ The following release workflow is triggered automatically when a new released is
9999Release Steps
100100=============
101101
102+ 1. Celery Tests
103+ ~~~~~~~~~~~~~~~
104+
105+ The plugin is used as the official testing infrastructure for Celery. Every new release
106+ requires manually testing that the new version works as expected with the Celery test suite.
107+
108+ To run the Celery test suite with the new version of the plugin, modify the Celery test environment as follows:
109+
110+ `test.txt <https://github.com/celery/celery/blob/main/requirements/test.txt# >`_
111+ -------------------------------------------------------------------------------
112+
113+ Comment out the pytest-celery `installation line <https://github.com/celery/celery/blob/main/requirements/test.txt#L2 >`_.
114+
115+ `tox.ini <https://github.com/celery/celery/blob/main/tox.ini >`_
116+ ---------------------------------------------------------------
117+
118+ Add ``-e "../pytest-celery[all]" `` to the `deps <https://github.com/celery/celery/blob/main/tox.ini#L30 >`_ list.
119+
120+ .. code-block :: ini
121+
122+ [testenv]
123+ ...
124+ deps =
125+ -e " ../pytest-celery[all]"
126+ -r{toxinidir}/requirements/test.txt
127+ ...
128+
129+ And then execute with tox::
130+
131+ tox -e 3.12-smoke -- -n auto
132+
133+ This will run the Celery test suite with the new version of the plugin in edit mode, allowing
134+ you to test the new version before releasing it and tweaking it if necessary to debug any issues.
135+
136+ .. tip ::
137+
138+ Use the following snippet to run all of the tests with the new version of the plugin:
139+
140+ Pull RabbitMQ & Redis images for the integration tests:
141+
142+ .. code-block :: console
143+
144+ docker run -d -p 6379:6379 --name redis redis:latest
145+ docker run -d -p 5672:5672 -p 15672:15672 --name rabbitmq rabbitmq:management
146+
147+ Unit Tests:
148+
149+ .. code-block :: console
150+
151+ tox -e 3.12-unit
152+
153+ Integration Tests:
154+
155+ .. code-block :: console
156+
157+ docker start rabbitmq redis
158+ tox -e 3.12-integration-rabbitmq_redis
159+ docker stop rabbitmq redis
160+
161+ Unit & Integration & Smoke Tests:
162+
163+ .. code-block :: console
164+
165+ tox -e 3.12-unit && docker start rabbitmq redis && tox -e 3.12-integration-rabbitmq_redis && docker stop rabbitmq redis && tox -e 3.12-smoke -- -n auto
166+
167+ .. warning ::
168+
169+ The instructions above assume you have the :pypi: `pytest-celery <pytest-celery> ` and :pypi: `celery <celery> ` repositories
170+ cloned in the same root directory.
171+
172+ 2. Release PR
173+ ~~~~~~~~~~~~~
174+
102175To make a new release, you need to create a new PR with one of these titles.
103176
104177- **Official Release **: Prepare for release: vX.Y.Z
@@ -112,3 +185,20 @@ The PR should contain the following changes:
112185This PR will be used as a double check for the CI to make sure everything passes successfully before releasing the new version.
113186Once this PR is merged, the last step is to `release a version on GitHub <https://github.com/celery/pytest-celery/releases/new >`_.
114187This will trigger the :ref: `CD pipeline <continuous_deployment >` to deploy the new release to PyPI automatically.
188+
189+ SemVer
190+ ------
191+
192+ If you're not sure how to number the version, consult the `SemVer <https://semver.org/ >`_ documentation.
193+
194+ 3. Post-release
195+ ~~~~~~~~~~~~~~~
196+
197+ After the release is done, you should update the official Celery to use the new version of the plugin, in the
198+ same `test.txt <https://github.com/celery/celery/blob/main/requirements/test.txt# >`_ that you modified earlier.
199+
200+ Future Releases
201+ ===============
202+
203+ Releases should be planned in the official `Milestones <https://github.com/celery/pytest-celery/milestones >`_ of the repository.
204+ Each milestone should include in its description what is planned for the release and when is the expected release date.
0 commit comments