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 e109a7e3 authored by Dorian Turba's avatar Dorian Turba
Browse files

update pytest

parent a588c803
No related branches found
No related tags found
No related merge requests found
......@@ -16,8 +16,9 @@ automation, modular fixtures, parameterized testing, and many other features.
| Name | Description | Default |
|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------|
| `PYTHON_SETUP` | Bash commands to setup your python environment. Default rely on `pyproject.toml` to install project and test dependencies. | `"pip install .[TESTS]"` |
| `PROJECT_PATH` | The path to the project root directory. | `"."` |
| `IMAGE_TAG` | The default tag for the docker image. See [Python Docker Official Image](https://hub.docker.com/_/python) for supported tags and respective Dockerfile links | `"latest"` |
| `PYTHON_SETUP` | Bash commands to setup your python environment. Default rely on `pyproject.toml` to install project and test dependencies. | `"pip install .[TESTS]"` |
## Global Configuration of pytest
......
......@@ -2,16 +2,17 @@ pytest:
image: python:${IMAGE_TAG}
stage: test
variables:
PYTHON_SETUP: "pip install .[TESTS]"
IMAGE_TAG: "latest"
PROJECT_PATH: "."
PYTHON_SETUP: "pip install ${PROJECT_PATH}[TESTS]"
script:
- python --version # Debug
- python -m venv venv --upgrade-deps || python -m venv venv # upgrade-deps is not supported before 3.9
- source venv/bin/activate
- ${PYTHON_SETUP}
- pytest
- pytest ${PROJECT_PATH}
only:
changes:
- ./**/*.py
- ${PROJECT_PATH}/**/*.py
- .gitlab-ci.yml
- pyproject.toml
- ${PROJECT_PATH}/pyproject.toml
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