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. ...@@ -7,27 +7,22 @@ This template is for run tests with pytest.
## How to use it ## How to use it
Add the following in your `.gitlab-ci.yml` file. Add the following in your `.gitlab-ci.yml` file.
Variables are set with the inputs, in include section.
As a remote Template (recommended): You can customize the job by overriding specific inputs.
```yaml ```yaml
include: include:
- remote: 'https://lab.frogg.it/beebryte/cicd/templates/pytest/-/raw/0.1.0/templates/pytest.yml' - project: 'beebryte/cicd/templates/pytest'
``` ref: '$CI_COMMIT_BRANCH$CI_COMMIT_TAG'
file: 'templates/pytest.yml'
## Customize job inputs:
project_path: 'path/to/my/project'
You can customize the job by overriding specific keys. For example:
```yaml
pytest:
variables:
PROJECT_PATH: "path/to/my/project"
``` ```
## Variables ## Inputs
| Name | Description | Default | | Name | Description | Default |
|----------------|-----------------------------------------|--------------------------| |----------------|-----------------------------------------|------------------------|
| `PROJECT_PATH` | The path to the project root directory. | `"."` | | `project_path` | The path to the project root directory. | `"."` |
| `PYTEST_CMD` | The command running tests with pytest. | `"pytest $PROJECT_PATH"` | | `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: spec:
inputs: inputs:
stage: stage:
description: "The stage of the job."
default: test default: test
project_path: project_path:
description: "The path to the project root directory."
default: '.' default: '.'
pytest_cmd: pytest_cmd:
description: "The command running tests with pytest."
default: 'pytest $PROJECT_PATH' default: 'pytest $PROJECT_PATH'
--- ---
pytest: pytest:
image: swepy/pytest:latest 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