# This is a sample build configuration for Python.
# Check our guides at https://confluence.atlassian.com/x/x4UWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: continuumio/anaconda:latest

pipelines:
  default:
    - step:
        caches:
          - condacache
          - pip
        script: # Modify the commands below to build your repository.
          - apt-get update -y && apt-get -y install libgl1-mesa-glx 
          - mkdir -p /usr/share/man/man1mkdir -p /usr/share/man/man1
          - apt-get -y install -f openjdk-11-jre-headless texlive-latex-extra dvipng
          - conda env update -n resultsanalysis --file environment.yml
          - conda activate resultsanalysis
          - cd ../
          - git clone git@bitbucket.org:mdd31/xmlvalidator.git
          - cd xmlvalidator
          - pip install .
          - cd ../
          - git clone git@bitbucket.org:mdd31/phasexmlcreator.git
          - cd phasexmlcreator
          - pip install .
          - cd ../
          - git clone git@bitbucket.org:mdd31/phasexmlparser.git
          - cd phasexmlparser
          - pip install .
          - cd ../
          - git clone git@bitbucket.org:mdd31/resultsanalysis.git
          - ls
          - cd resultsanalysis
          - pip install .
          - cd ../
          - git clone git@bitbucket.org:mdd31/solventmapcreator.git
          - ls
          - cd solventmapcreator
          - pip install .
          - cd ../
          - git clone git@bitbucket.org:mdd31/puresolventinformation.git
          - ls
          - cd puresolventinformation
          - pip install .
          - cd ../build
          - pip install .
          - pytest phasecalculator/test/*test/*test.py

definitions:
  caches:
    condacache: ~/.conda/envs/resultsanalysis
