mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-21 05:55:35 +00:00
e763a4473e
With git-clone version 0.8 and onwards, it started running as non-root and GKE clusters were having some issues, so, we temporarily moved all tasks to use git-clone version 0.7. Ref: https://github.com/tektoncd/catalog/pull/1079 Since we have now moved to kind clusters in our CI, this issue is now resolved and thus moving all tasks to use latest version of git-clone Signed-off-by: vinamra28 <jvinamra776@gmail.com> |
||
---|---|---|
.. | ||
tests | ||
python-coverage.yaml | ||
README.md |
Python Coverage
The task provides code coverage based on coverage for Python. The used images are based on the official Docker Hub Python images. The installation of the packages is performed via a pip install
.
It is required that pytest
and coverage
is part of the requirements file for the task. If the module is not included a warning will be printed.
Install the Task
Workspaces
- source: A Workspace volume containing the python code.
Install pytest
kubectl apply -f https://api.hub.tekton.dev/v1/resource/tekton/task/python-coverage/0.1/raw
Parameters
- PYTHON: The used Python version, more precisely the tag for the Python image (default:
latest
) - ARGS: The additional arguments to be used with pytest
- SOURCE_PATH: The path to the source code (default:
.
) - REQUIREMENTS_FILE: The name of the requirements file inside the source location (default:
requirements.txt
)
Platforms
The Task can be run on linux/amd64
, linux/s390x
, and linux/ppc64le
platforms.
Usage
This TaskRun
runs pytest
and coverage
on a repository.
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
name: python-coverage-run
spec:
taskRef:
name: python-coverage
workspaces:
- name: source
persistentVolumeClaim:
claimName: my-source
params:
- name: PYTHON
value: "3.7"
- name: ARGS
value: "-rfs"