@@ -12,7 +12,7 @@ It will explain how does the CI/CD pipeline work and how to trigger a new releas
12
12
13
13
.. contents ::
14
14
:local:
15
- :depth: 3
15
+ :depth: 2
16
16
17
17
CI/CD Pipeline
18
18
==============
@@ -99,6 +99,79 @@ The following release workflow is triggered automatically when a new released is
99
99
Release Steps
100
100
=============
101
101
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
+
102
175
To make a new release, you need to create a new PR with one of these titles.
103
176
104
177
- **Official Release **: Prepare for release: vX.Y.Z
@@ -112,3 +185,14 @@ The PR should contain the following changes:
112
185
This PR will be used as a double check for the CI to make sure everything passes successfully before releasing the new version.
113
186
Once this PR is merged, the last step is to `release a version on GitHub <https://github.com/celery/pytest-celery/releases/new >`_.
114
187
This 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.
0 commit comments