mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 02:56:56 +08:00
Documentation improvements.
This commit is contained in:
20
.github/workflows/Pipeline.yml
vendored
20
.github/workflows/Pipeline.yml
vendored
@@ -17,11 +17,15 @@ jobs:
|
||||
with:
|
||||
doc: Documentation
|
||||
|
||||
# ArtifactCleanUp:
|
||||
# uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@r0
|
||||
# needs:
|
||||
# - BuildTheDocs
|
||||
# - PublishToGitHubPages
|
||||
# with:
|
||||
# remaining: |
|
||||
# Documentation
|
||||
ArtifactCleanUp:
|
||||
name: 🗑️ Artifact Cleanup
|
||||
needs:
|
||||
- BuildTheDocs
|
||||
- PublishToGitHubPages
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 🗑️ Delete artifacts
|
||||
uses: geekyeggo/delete-artifact@v1
|
||||
with:
|
||||
name: Documentation
|
||||
|
||||
@@ -35,7 +35,7 @@ Complex Example
|
||||
The following instantiation example creates 3 jobs from the same template, but with differing input parameters. The
|
||||
first job `UnitTestingParams` might be used to create a job matrix of unit tests. It creates the cross of default
|
||||
systems (Windows, Ubuntu, MacOS, MinGW64) and the given list of Python versions including some mypy versions. In
|
||||
addition a list of excludes (marked as :deletetion:`deletion`) and includes (marked as :additions:`additions`) is handed
|
||||
addition a list of excludes (marked as :deletion:`deletions`) and includes (marked as :addition:`additions`) is handed
|
||||
over resulting in the following combinations:
|
||||
|
||||
+---------+-------------+-------------+-------------+--------------+-------------------------+---------+----------+------------------------------+------------------------------+
|
||||
|
||||
@@ -1,7 +1,22 @@
|
||||
PublishOnPyPI
|
||||
#############
|
||||
|
||||
Publish a source (``*.tar.gz``) and wheel (``*.whl``) packages to `PyPI <https://pypi.org/>`__.
|
||||
Publish a source (``*.tar.gz``) package and/or wheel (``*.whl``) packages to `PyPI <https://pypi.org/>`__.
|
||||
|
||||
**Behavior:**
|
||||
|
||||
1. Download package artifact
|
||||
2. Publish source package(s) (``*.tar.gz``)
|
||||
3. Publish wheel package(s) (``*.whl``)
|
||||
4. Delete the artifact
|
||||
|
||||
**Preconditions:**
|
||||
|
||||
A PyPI account was created and the package name is either not occupied or the user has access rights for that package.
|
||||
|
||||
**Requirements:**
|
||||
|
||||
Setup a secret (e.g. ``PYPI_TOKEN``) in GitHub to handover the PyPI token to the job.
|
||||
|
||||
Instantiation
|
||||
*************
|
||||
@@ -9,6 +24,9 @@ Instantiation
|
||||
Simple Example
|
||||
==============
|
||||
|
||||
The following example demonstrates how to publish the artifact named ``Package`` to PyPI on every pipeline run triggered
|
||||
by a Git tag. A secret is forwarded from GitHub secrets to a job secret.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
jobs:
|
||||
@@ -25,10 +43,18 @@ Simple Example
|
||||
Complex Example
|
||||
===============
|
||||
|
||||
In this more complex example, the job depends on a parameter creation (``Params``) and packaging job (``Package``). The
|
||||
used Python version is overwritten by a parameter calculated in the ``Params`` jobs. Also the artifact name is managed
|
||||
by that job. Finally, the list of requirements is overwritten to load a list of requirements from ``dist/requirements.txt``.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
jobs:
|
||||
# ...
|
||||
Params:
|
||||
# ...
|
||||
|
||||
Package:
|
||||
# ...
|
||||
|
||||
PublishOnPyPI:
|
||||
uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@r0
|
||||
@@ -43,8 +69,8 @@ Complex Example
|
||||
secrets:
|
||||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
||||
|
||||
Template Parameters
|
||||
*******************
|
||||
Parameters
|
||||
**********
|
||||
|
||||
python_version
|
||||
==============
|
||||
@@ -73,8 +99,8 @@ PYPI_TOKEN
|
||||
|
||||
The token to access the package at PyPI for uploading new data.
|
||||
|
||||
Template Results
|
||||
****************
|
||||
Results
|
||||
*******
|
||||
|
||||
*None*
|
||||
|
||||
|
||||
@@ -1,31 +1,33 @@
|
||||
StaticTypeCheck
|
||||
###############
|
||||
|
||||
collect static type check result with `mypy`, and
|
||||
optionally upload results as an HTML report.
|
||||
Example `commands`:
|
||||
collect static type check result with mypy, and optionally upload results as an HTML report.
|
||||
|
||||
1. Regular package
|
||||
Example ``commands``:
|
||||
|
||||
1. Regular package
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
```yml
|
||||
commands: mypy --html-report htmlmypy -p ToolName
|
||||
```
|
||||
|
||||
2. Parent namespace package
|
||||
|
||||
```yml
|
||||
2. Parent namespace package
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
commands: |
|
||||
touch Parent/__init__.py
|
||||
mypy --html-report htmlmypy -p ToolName
|
||||
```
|
||||
|
||||
3. Child namespace package
|
||||
3. Child namespace package
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
```yml
|
||||
commands: |
|
||||
cd Parent
|
||||
mypy --html-report ../htmlmypy -p ToolName
|
||||
```
|
||||
|
||||
|
||||
Instantiation
|
||||
*************
|
||||
|
||||
@@ -105,6 +105,7 @@ License
|
||||
|
||||
Action/index
|
||||
Action/Releaser
|
||||
Action/With-post-step
|
||||
|
||||
.. raw:: latex
|
||||
|
||||
|
||||
Reference in New Issue
Block a user