image: python:latest

workflow:
  rules:
    - if: $CI_COMMIT_BRANCH

pages:
  stage: deploy
  script:
    - python3 --version
    - pip install --upgrade sphinx numpy sphinx_adc_theme
    - pip install git+http://enno:xrge6-j2NkpRwsi9BXQn@gitlab.kid.local/kidzg/ammosreader.git
    - sphinx-build -b html doc/rst/ public
  artifacts:
    paths:
    - public
  rules:
    - if: $CI_COMMIT_BRANCH == "guix"

pytest:
  stage: test
  script:
    - cd tests
    - pip install -U pytest 
    - pytest --junitxml=report.xml
  artifacts:
    when: always
    reports:
      junit: tests/report.xml
  rules:
    - if: $CI_COMMIT_BRANCH == "guix"
