Commit 9d8037ee authored by Federico Falconieri's avatar Federico Falconieri
Browse files

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

fix: allow missing PYTHON_PACKAGE

See merge request ci/templates!60
parents b171c341 7032be6e
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
---
variables:
  PYTHON_PACKAGE: "mypackage"

include:
  - local: "alm/semantic-release.yml"
  - local: "other/gitlab/project-settings.yml"
+2 −4
Original line number Diff line number Diff line
---
# https://github.com/python/mypy
# this job uses mypy2junit to get the junitxml report in gitlab CI

python:mypy:
  stage: test
  image: registry.gitlab.com/notno/python-tests
  variables:
    CHECK_PATH: "./${PYTHON_PACKAGE}"
    EXCLUDE_REGEX: '(tests/|setup.py)'  # Keep the single quotes
    DEFAULT_SETTINGS: "--strict --ignore-missing-imports --show-error-context"
    EXTRA_SETTINGS: ""  # Use this to add your settings to the default
  before_script:
    - pip install .
  script:
    - pip install mypy
    - mypy --install-types --non-interactive --junit-xml ${CI_PROJECT_DIR}/mypy-report.xml ${DEFAULT_SETTINGS} ${EXTRA_SETTINGS} ${CHECK_PATH}
    - mypy --install-types --non-interactive --junit-xml ${CI_PROJECT_DIR}/mypy-report.xml --exclude $EXCLUDE_REGEX ${DEFAULT_SETTINGS} ${EXTRA_SETTINGS} ${CHECK_PATH}
  artifacts:
    reports:
      junit: mypy-report.xml
+2 −1
Original line number Diff line number Diff line
@@ -4,12 +4,13 @@ python:pytest:
  stage: test
  variables:
    PYTEST_COVERAGE_THRESHOLD: "25"
    CHECK_PATH: "./${PYTHON_PACKAGE}"
    EXTRA_ARGS: ""  # Set optional arguments
  before_script:
    - pip install .
  script:
    - pip install pytest pytest-asyncio pytest-xdist pytest-cov
    - python -m pytest -vvv --cov=${PYTHON_PACKAGE} --cov-fail-under=${PYTEST_COVERAGE_THRESHOLD} --junitxml=${CI_PROJECT_DIR}/pytest-report.xml ${EXTRA_ARGS}
    - python -m pytest -vvv --cov=${CHECK_PATH} --cov-fail-under=${PYTEST_COVERAGE_THRESHOLD} --junitxml=${CI_PROJECT_DIR}/pytest-report.xml ${EXTRA_ARGS}
  artifacts:
    reports:
      junit: pytest-report.xml