mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 02:56:56 +08:00
Fine tuning documentation pages.
This commit is contained in:
@@ -3,73 +3,8 @@
|
||||
BuildTheDocs
|
||||
############
|
||||
|
||||
This jobs compiles the documentation written in ReStructured Text with Sphinx using BuildTheDocs.
|
||||
.. attention::
|
||||
|
||||
**Behavior:**
|
||||
The ``BuildTheDocs`` job template is deprecated.
|
||||
|
||||
1. Checkout repository.
|
||||
2. Build the documentation.
|
||||
3. Upload the HTML documentation as an artifact.
|
||||
4. Publish the HTML documentation to GitHub Pages.
|
||||
|
||||
**Dependencies:**
|
||||
|
||||
* :gh:`actions/checkout`
|
||||
* :gh:`buildthedocs/btd`
|
||||
* :gh:`actions/upload-artifact`
|
||||
|
||||
|
||||
|
||||
Instantiation
|
||||
*************
|
||||
|
||||
Simple Example
|
||||
==============
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
jobs:
|
||||
BuildTheDocs:
|
||||
uses: pyTooling/Actions/.github/workflows/BuildTheDocs.yml@r5
|
||||
|
||||
|
||||
Complex Example
|
||||
===============
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
jobs:
|
||||
BuildTheDocs:
|
||||
uses: pyTooling/Actions/.github/workflows/BuildTheDocs.yml@r5
|
||||
needs:
|
||||
- Params
|
||||
with:
|
||||
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).documentation_html }}
|
||||
|
||||
|
||||
Parameters
|
||||
**********
|
||||
|
||||
artifact
|
||||
========
|
||||
|
||||
+----------------+----------+----------+--------------+
|
||||
| Parameter Name | Required | Type | Default |
|
||||
+================+==========+==========+==============+
|
||||
| artifact | optional | string | ``""`` |
|
||||
+----------------+----------+----------+--------------+
|
||||
|
||||
Name of the documentation artifact.
|
||||
|
||||
If no artifact name is given, the job directly publishes the documentation's HTML content to GitHub Pages.
|
||||
|
||||
|
||||
Secrets
|
||||
*******
|
||||
|
||||
This job template needs no secrets.
|
||||
|
||||
Results
|
||||
*******
|
||||
|
||||
This job template has no output parameters.
|
||||
See :ref:`JOBTMPL/SphinxDocumentation` and :ref:`JOBTMPL/LaTeXDocumentation`.
|
||||
|
||||
@@ -3,166 +3,8 @@
|
||||
CoverageCollection
|
||||
##################
|
||||
|
||||
This jobs runs the specified unit tests with activated code coverage collection (incl. branch coverage).
|
||||
.. attention::
|
||||
|
||||
It uses pytest, pytest-cov and coverage.py in a single job run, thus it uses one fixed Python version (usually latest).
|
||||
It generates HTML and Cobertura reports (XML), then it uploads the HTML report as an artifact and the jUnit test results
|
||||
(XML) to `Codecov <https://about.codecov.io/>`__ and `Codacy <https://www.codacy.com/>`__.
|
||||
The ``CoverageCollection`` job template is deprecated.
|
||||
|
||||
Configuration options to ``pytest`` and ``coverage.py`` should be given via sections ``[tool.pytest.ini_options]`` and
|
||||
``[tool.coverage.*]`` in a ``pyproject.toml`` file.
|
||||
|
||||
**Behavior:**
|
||||
|
||||
1. Checkout repository
|
||||
2. Setup Python and install dependencies
|
||||
3. Extract configuration from ``pyproject.toml`` or ``.coveragerc``.
|
||||
4. Run unit tests and collect code coverage
|
||||
5. Convert coverage data to a Cobertura XML file
|
||||
6. Convert coverage data to a HTML report
|
||||
7. Upload HTML report as an artifact
|
||||
8. Publish Cobertura file to CodeCov
|
||||
9. Publish Cobertura file to Codacy
|
||||
|
||||
**Preconditions:**
|
||||
|
||||
* A CodeCov account was created.
|
||||
* A Codacy account was created.
|
||||
|
||||
**Requirements:**
|
||||
|
||||
Setup a secret (e.g. ``codacy_token``) in GitHub to handover the Codacy project token to the job.
|
||||
|
||||
**Dependencies:**
|
||||
|
||||
* :gh:`actions/checkout`
|
||||
* :gh:`actions/setup-python`
|
||||
* :gh:`actions/upload-artifact`
|
||||
* :gh:`codecov/codecov-action`
|
||||
* :gh:`codacy/codacy-coverage-reporter-action`
|
||||
|
||||
|
||||
Instantiation
|
||||
*************
|
||||
|
||||
Simple Example
|
||||
==============
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
jobs:
|
||||
Coverage:
|
||||
uses: pyTooling/Actions/.github/workflows/CoverageCollection.yml@r5
|
||||
with:
|
||||
artifact: Coverage
|
||||
secrets: inherit
|
||||
|
||||
Complex Example
|
||||
===============
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
jobs:
|
||||
Coverage:
|
||||
uses: pyTooling/Actions/.github/workflows/CoverageCollection.yml@r5
|
||||
needs:
|
||||
- Params
|
||||
with:
|
||||
python_version: ${{ needs.Params.outputs.python_version }}
|
||||
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }}
|
||||
secrets: inherit
|
||||
|
||||
Parameters
|
||||
**********
|
||||
|
||||
python_version
|
||||
==============
|
||||
|
||||
+----------------+----------+----------+----------+
|
||||
| Parameter Name | Required | Type | Default |
|
||||
+================+==========+==========+==========+
|
||||
| python_version | optional | string | 3.11 |
|
||||
+----------------+----------+----------+----------+
|
||||
|
||||
Python version used for running unit tests.
|
||||
|
||||
|
||||
requirements
|
||||
============
|
||||
|
||||
+----------------+----------+----------+-------------------------------+
|
||||
| Parameter Name | Required | Type | Default |
|
||||
+================+==========+==========+===============================+
|
||||
| requirements | optional | string | ``-r tests/requirements.txt`` |
|
||||
+----------------+----------+----------+-------------------------------+
|
||||
|
||||
Python dependencies to be installed through pip.
|
||||
|
||||
|
||||
tests_directory
|
||||
===============
|
||||
|
||||
+-----------------+----------+----------+-----------+
|
||||
| Parameter Name | Required | Type | Default |
|
||||
+=================+==========+==========+===========+
|
||||
| tests_directory | optional | string | ``tests`` |
|
||||
+-----------------+----------+----------+-----------+
|
||||
|
||||
Path to the directory containing tests (test working directory).
|
||||
|
||||
|
||||
unittest_directory
|
||||
==================
|
||||
|
||||
+--------------------+----------+----------+-----------+
|
||||
| Parameter Name | Required | Type | Default |
|
||||
+====================+==========+==========+===========+
|
||||
| unittest_directory | optional | string | ``unit`` |
|
||||
+--------------------+----------+----------+-----------+
|
||||
|
||||
Path to the directory containing unit tests (relative to tests_directory).
|
||||
|
||||
|
||||
coverage_config
|
||||
===============
|
||||
|
||||
+-----------------+----------+----------+--------------------+
|
||||
| Parameter Name | Required | Type | Default |
|
||||
+=================+==========+==========+====================+
|
||||
| coverage_config | optional | string | ``pyproject.toml`` |
|
||||
+-----------------+----------+----------+--------------------+
|
||||
|
||||
Path to the ``.coveragerc`` file. Use ``pyproject.toml`` by default.
|
||||
|
||||
|
||||
artifact
|
||||
========
|
||||
|
||||
+----------------+----------+----------+--------------+
|
||||
| Parameter Name | Required | Type | Default |
|
||||
+================+==========+==========+==============+
|
||||
| artifact | yes | string | — — — — |
|
||||
+----------------+----------+----------+--------------+
|
||||
|
||||
Name of the coverage artifact.
|
||||
|
||||
|
||||
Secrets
|
||||
*******
|
||||
|
||||
codacy_token
|
||||
============
|
||||
|
||||
+----------------+----------+----------+--------------+
|
||||
| Secret Name | Required | Type | Default |
|
||||
+================+==========+==========+==============+
|
||||
| codacy_token | yes | string | — — — — |
|
||||
+----------------+----------+----------+--------------+
|
||||
|
||||
Token to push result to codacy.
|
||||
|
||||
|
||||
Results
|
||||
*******
|
||||
|
||||
This job template has no output parameters.
|
||||
See :ref:`JOBTMPL/UnitTesting` and :ref:`JOBTMPL/PublishCoverageResults`.
|
||||
|
||||
@@ -3,20 +3,8 @@
|
||||
NightlyRelease
|
||||
##############
|
||||
|
||||
.. todo:: NightlyRelease:Needs documentation.
|
||||
.. attention::
|
||||
|
||||
**Behavior:**
|
||||
The ``NightlyRelease`` job template is deprecated.
|
||||
|
||||
.. todo:: NightlyRelease:Behavior needs documentation.
|
||||
|
||||
**Dependencies:**
|
||||
|
||||
.. todo:: NightlyRelease:Dependencies needs documentation.
|
||||
|
||||
Instantiation
|
||||
*************
|
||||
|
||||
Simple Example
|
||||
==============
|
||||
|
||||
.. todo:: NightlyRelease:Simple example needs documentation.
|
||||
See :ref:`JOBTMPL/PublishReleaseNotes`.
|
||||
|
||||
Reference in New Issue
Block a user