diff --git a/docs/conf.py b/docs/conf.py index 46bc6b0a..43074efc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -32,6 +32,8 @@ r"https://github\.com/Jc2k/pytest-docker-tools\?tab=readme-ov-file#images", r"https://github\.com/Jc2k/pytest-docker-tools\?tab=readme-ov-file#containers", r"https://github\.com/Jc2k/pytest-docker-tools\?tab=readme-ov-file#fixture-wrappers", + r"https://github\.com/celery/celery/blob/main/requirements/test\.txt#L2", + r"https://github\.com/celery/celery/blob/main/tox\.ini#L30", ], autodoc_mock_imports=[], ) diff --git a/docs/devguide/release.rst b/docs/devguide/release.rst index 52fc9e35..fc4f77af 100644 --- a/docs/devguide/release.rst +++ b/docs/devguide/release.rst @@ -12,7 +12,7 @@ It will explain how does the CI/CD pipeline work and how to trigger a new releas .. contents:: :local: - :depth: 3 + :depth: 2 CI/CD Pipeline ============== @@ -99,6 +99,79 @@ The following release workflow is triggered automatically when a new released is Release Steps ============= +1. Celery Tests +~~~~~~~~~~~~~~~ + +The plugin is used as the official testing infrastructure for Celery. Every new release +requires manually testing that the new version works as expected with the Celery test suite. + +To run the Celery test suite with the new version of the plugin, modify the Celery test environment as follows: + +`test.txt `_ +------------------------------------------------------------------------------- + +Comment out the pytest-celery `installation line `_. + +`tox.ini `_ +--------------------------------------------------------------- + +Add ``-e "../pytest-celery[all]"`` to the `deps `_ list. + +.. code-block:: ini + + [testenv] + ... + deps= + -e "../pytest-celery[all]" + -r{toxinidir}/requirements/test.txt + ... + +And then execute with tox:: + + tox -e 3.12-smoke -- -n auto + +This will run the Celery test suite with the new version of the plugin in edit mode, allowing +you to test the new version before releasing it and tweaking it if necessary to debug any issues. + +.. tip:: + + Use the following snippet to run all of the tests with the new version of the plugin: + + Pull RabbitMQ & Redis images for the integration tests: + + .. code-block:: console + + docker run -d -p 6379:6379 --name redis redis:latest + docker run -d -p 5672:5672 -p 15672:15672 --name rabbitmq rabbitmq:management + + Unit Tests: + + .. code-block:: console + + tox -e 3.12-unit + + Integration Tests: + + .. code-block:: console + + docker start rabbitmq redis + tox -e 3.12-integration-rabbitmq_redis + docker stop rabbitmq redis + + Unit & Integration & Smoke Tests: + + .. code-block:: console + + 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 + +.. warning:: + + The instructions above assume you have the :pypi:`pytest-celery ` and :pypi:`celery ` repositories + cloned in the same root directory. + +2. Release PR +~~~~~~~~~~~~~ + To make a new release, you need to create a new PR with one of these titles. - **Official Release**: Prepare for release: vX.Y.Z @@ -112,3 +185,20 @@ The PR should contain the following changes: This PR will be used as a double check for the CI to make sure everything passes successfully before releasing the new version. Once this PR is merged, the last step is to `release a version on GitHub `_. This will trigger the :ref:`CD pipeline ` to deploy the new release to PyPI automatically. + +SemVer +------ + +If you're not sure how to number the version, consult the `SemVer `_ documentation. + +3. Post-release +~~~~~~~~~~~~~~~ + +After the release is done, you should update the official Celery to use the new version of the plugin, in the +same `test.txt `_ that you modified earlier. + +Future Releases +=============== + +Releases should be planned in the official `Milestones `_ of the repository. +Each milestone should include in its description what is planned for the release and when is the expected release date.