Skip to content

Latest commit

 

History

History
52 lines (31 loc) · 2.29 KB

File metadata and controls

52 lines (31 loc) · 2.29 KB

verify-python-package

Verifies the source files of a Python package using PDM.

🃏Example

steps:
  - uses: actions/checkout@v4

  - uses: giancosta86/aurora-github/actions/verify-python-package@v10

💡How it works

  1. Run check-project-license to verify the LICENSE file.

  2. Run enforce-branch-version, forwarding the enforce-branch-version input to its mode input.

  3. If the pdm command is not installed (at the requested pdm-version, if declared), install it via pipx; upon installation, the latest version will be retrieved if pdm-version is not specified.

  4. Run pdm run verify - where the verify script should be defined in the [tool.pdm.scripts] of pyproject.toml.

  5. Run pdm build to build the project artifacts.

  6. Find critical TODOs in the source code - which crash the workflow by default.

☑️Requirements

  • pipx is mandatory when PDM has to be installed.

  • the verify script must be declared within pyproject.toml.

📥Inputs

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 .

🌐Further references