Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 25f14f53 authored by Karine Bauch's avatar Karine Bauch
Browse files

add inputs descriptions + update README.md

parent 5300aa79
No related branches found
No related tags found
1 merge request!10.1.0
......@@ -7,27 +7,22 @@ This template is for run tests with pytest.
## How to use it
Add the following in your `.gitlab-ci.yml` file.
As a remote Template (recommended):
Variables are set with the inputs, in include section.
You can customize the job by overriding specific inputs.
```yaml
include:
- remote: 'https://lab.frogg.it/beebryte/cicd/templates/pytest/-/raw/0.1.0/templates/pytest.yml'
```
## Customize job
You can customize the job by overriding specific keys. For example:
```yaml
pytest:
variables:
PROJECT_PATH: "path/to/my/project"
- project: 'beebryte/cicd/templates/pytest'
ref: '$CI_COMMIT_BRANCH$CI_COMMIT_TAG'
file: 'templates/pytest.yml'
inputs:
project_path: 'path/to/my/project'
```
## Variables
## Inputs
| Name | Description | Default |
|----------------|-----------------------------------------|--------------------------|
| `PROJECT_PATH` | The path to the project root directory. | `"."` |
| `PYTEST_CMD` | The command running tests with pytest. | `"pytest $PROJECT_PATH"` |
| Name | Description | Default |
|----------------|-----------------------------------------|------------------------|
| `project_path` | The path to the project root directory. | `"."` |
| `stage` | The stage of the job. | `test` |
| `pytest_cmd` | The command running tests with pytest. | `pytest $PROJECT_PATH` |
\ No newline at end of file
spec:
inputs:
stage:
description: "The stage of the job."
default: test
project_path:
description: "The path to the project root directory."
default: '.'
pytest_cmd:
description: "The command running tests with pytest."
default: 'pytest $PROJECT_PATH'
---
pytest:
image: swepy/pytest:latest
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment