Strengthen account_do tests and publishing checks
Add static coverage for module configuration, XML inventory, tax views, translations, migration metadata, and the Gitea publishing workflow. Make Gitea Actions run install, compileall, unittest, build, and twine check before publishing packages from series branches. Fix packaging documentation and RST rendering issues so package validation passes before upload.
This commit is contained in:
+12
-11
@@ -1,29 +1,30 @@
|
||||
Publishing
|
||||
==========
|
||||
|
||||
Every pushed commit builds, validates, and publishes the package to the Gitea
|
||||
PyPI-compatible package registry. The workflow intentionally does not use
|
||||
``actions/upload-artifact`` because current Gitea Actions runners do not support
|
||||
the GitHub artifact API required by ``upload-artifact@v4``.
|
||||
Every pushed commit installs the package, compiles the Python sources, runs the
|
||||
module tests, builds the distribution, and validates it with ``twine check``.
|
||||
Only branches named with the Tryton series, such as ``8.0``, continue to the
|
||||
publishing step after those checks pass.
|
||||
|
||||
The publishing workflow creates a CI-only package version by appending the run
|
||||
number to the module version from ``tryton.cfg``. For example, a module version
|
||||
of ``8.0.0`` is published as ``8.0.0.post123`` on run number ``123``.
|
||||
The publishing workflow creates a CI-only package version by reading the
|
||||
published versions in Gitea's PyPI-compatible package registry and assigning the
|
||||
next patch version for the branch series. For example, branch ``8.0`` publishes
|
||||
``8.0.0`` when no package exists yet, then ``8.0.1``, ``8.0.2``, and so on.
|
||||
|
||||
This is necessary because Gitea's PyPI-compatible registry is a custom package
|
||||
repository for Twine and does not support ``twine upload --skip-existing``.
|
||||
|
||||
Required repository secrets:
|
||||
|
||||
* ``GITEA_PACKAGE_USER``
|
||||
* ``GITEA_PACKAGE_TOKEN``
|
||||
* ``REGISTRY_USER``
|
||||
* ``REGISTRY_PASSWORD``
|
||||
|
||||
Publish a release branch:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
git switch -c 8.0.0
|
||||
git push origin 8.0.0
|
||||
git switch 8.0
|
||||
git push origin 8.0
|
||||
|
||||
Install from Gitea:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user