Commit 9564317b authored by Ruben ten Hove's avatar Ruben ten Hove
Browse files

feat: allow custom plugins

parent 51207b60
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
---
# Add plugins by changing INSTALL_PYTEST_PLUGINS.
# See https://docs.pytest.org/en/latest/reference/plugin_list.html for available plugins

python:pytest:
  image: registry.gitlab.com/notno/python-tests
  stage: test
  variables:
    PYTEST_COVERAGE_THRESHOLD: "25"
    INSTALL_PYTEST_PLUGINS: "pytest-asyncio pytest-xdist"
    CHECK_PATH: "./${PYTHON_PACKAGE}"
    EXTRA_ARGS: ""  # Set optional arguments
  before_script:
    - pip install .
  script:
    - pip install pytest pytest-asyncio pytest-xdist pytest-cov
    - pip install pytest pytest-cov ${INSTALL_PYTEST_PLUGINS}
    - python -m pytest -vvv --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 ${EXTRA_ARGS}
  artifacts:
    reports: