Skip to content
Snippets Groups Projects
.gitlab-ci.yml 960 B
Newer Older
image: python

    - pip3 install black 'pylint<3' 'isort[colors]<6'
    - pip3 install --editable .
    - black --check --diff --color .
    - isort --check --diff --color .
    - pylint src/finam

test:
  stage: test
  script:
    - pip3 install --editable .[test]
    - python -m pytest --cov finam --cov-report term-missing --cov-report xml:cov.xml -v tests/
  coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
  artifacts:
    reports:
      coverage_report:
        coverage_format: cobertura
        path: cov.xml
    - pip3 install --editable .[doc]
    - sphinx-apidoc --separate -o docs src/finam
    - sphinx-build -b html docs docs/build
    - mv docs/build public/
  artifacts:
    paths:
      - public

pages:
  stage: deploy
  script: "true"
  artifacts:
    paths:
      - public
  only:
    - main