Skip to content

Test

poetry | test

- uses: jambazid/gha-actions/python/poetry/test@unknown
  with:
    working-directory: (1)
  1. Python project location (path to the pyproject.toml folder).

Executes a Python project's test suite via pytest and then uploads coverage reports if the workflow was triggered by a PR.

Important

Assumes the following Project folder structure:

${working-directory}
├── pyproject.toml
├── ...
|
├── /src
|   └── /${namespace}
|       └── /${component}
|           └── ...
|
└── /tests
    └── ...

Inputs: ¤

Name Description Default
working-directory ¤

Python project location (path to the pyproject.toml folder).

low-pct-coverage-threshold ¤

Minimum test coverage requirement for non-failing builds.

60
high-pct-coverage-threshold ¤

Good test coverage threshold.

90
html-results-path ¤

Path to the HTML test results file (relative to working-directory).

test_results.html
html-coverage-path ¤

Path to the HTML coverage report folder (relative to working-directory).

reports/html
codecov-token ¤

Codecov token (OPTIONAL).

Leave unset to disable Codecov scanning and uploads.

Set to "OIDC" for repository-scoped OIDC authentication with Codecov.

pytest-args ¤

Additional args for PyTest.