Verifies the source files of a Python package using PDM.
steps:
- uses: actions/checkout@v4
- uses: giancosta86/aurora-github/actions/verify-python-package@v10-
Run check-project-license to verify the LICENSE file.
-
Run enforce-branch-version, forwarding the
enforce-branch-versioninput to itsmodeinput. -
If the
pdmcommand is not installed (at the requestedpdm-version, if declared), install it via pipx; upon installation, the latest version will be retrieved ifpdm-versionis not specified. -
Run
pdm run verify- where the verify script should be defined in the[tool.pdm.scripts]of pyproject.toml. -
Run
pdm buildto build the project artifacts. -
Find critical TODOs in the source code - which crash the workflow by default.
-
pipxis mandatory when PDM has to be installed. -
the verify script must be declared within pyproject.toml.
| Name | Type | Description | Default value |
|---|---|---|---|
pdm-version |
string | Version of PDM that should be used | |
crash-on-critical-todos |
boolean | Crash the workflow if critical TODOs are found | true |
source-file-regex |
string | PCRE pattern describing the source files | view source |
enforce-branch-version |
inject,check,skip |
How the branch version should be enforced | inject |
project-directory |
string | The directory containing pyproject.toml | . |