image: python:latest

workflow:
  rules:
    - if: $CI_COMMIT_BRANCH

pages:
  stage: deploy
  script:
    - python3 --version
    - pip install --upgrade numpy pdoc3
    - pip install git+http://enno:xrge6-j2NkpRwsi9BXQn@gitlab.kid.local/kidzg/ammosreader.git
    - cd ammosreader
    - pdoc3 --html . -o ../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"
