image: python:latest

variables:
  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"

cache:
  paths:
    - .cache/pip
    - venv/

before_script:
  - python --version
  - pip install virtualenv
  - virtualenv venv
  - source venv/bin/activate

build-job:
  stage: build
  script:
    - python -m pip install .

test-exec:
  stage: test
  script:
    - python -m pip install .
    - gboml test/test24.txt --linprog
    - gboml test/test25.txt --linprog
    - gboml test/test26.txt --linprog
    - gboml test/test27.txt --linprog
    - gboml test/test28.txt --linprog

test-graphobject:
  stage: test
  script:
    - python -m pip install .
    - python -c "import gboml; print(gboml.GbomlGraph())"

test-main:
  stage: test
  script:
    - pip install -r requirements.txt
    - cd src
    - python main.py ../test/test28.txt --linprog