.test:
  stage: test
  image:
    name: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
    entrypoint: [""]
  before_script:
    - pip install '.[dev]'

lint:
  extends: .test
  before_script:
    - pip install black
  script:
    - make ci-show-lint

pytest:
  extends: .test
  script:
    - pytest -v --cov-report= --cov permifrost -m "$PYTEST_MARKERS"
    - coverage report
    - coverage xml
  coverage: '/TOTAL.*\s+(\d+%)$/'
  artifacts:
    reports:
      coverage_report:
        coverage_format: cobertura
        path: coverage.xml
