Commit 12e7c4bf authored by Federico Falconieri's avatar Federico Falconieri
Browse files

Merge branch 'hoverht-master-patch-97134' into 'master'

fix: allow pytest plugin selection

See merge request ci/templates!113
parents b5ee8e15 8865e1bc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -7,13 +7,13 @@ python:pytest:
  stage: test
  variables:
    PYTEST_COVERAGE_THRESHOLD: "25"
    INSTALL_PYTEST_PLUGINS: "pytest-asyncio pytest-xdist"
    INSTALL_PYTEST_PLUGINS: "pytest-asyncio pytest-xdist"  # See https://docs.pytest.org/en/latest/reference/plugin_list.html
    CHECK_PATH: "./${PYTHON_PACKAGE}"
    DEFAULT_ARGS: "-vvv --capture=tee-sys"
    EXTRA_ARGS: ""  # Set optional arguments
  script:
    - pip install pytest pytest-cov ${INSTALL_PYTEST_PLUGINS}
    - pip install .
    - pip install pytest pytest-asyncio pytest-xdist pytest-cov
    - python -m pytest --cov=${CHECK_PATH} --cov-fail-under=${PYTEST_COVERAGE_THRESHOLD} --junitxml=${CI_PROJECT_DIR}/pytest-report.xml --cov-report xml:${CI_PROJECT_DIR}/pytest-coverage.xml -o cache_dir=${CI_PROJECT_DIR}/.pytest_cache ${DEFAULT_ARGS} ${EXTRA_ARGS}
  artifacts:
    reports: