.gitlab-ci.yml 896 Bytes
Newer Older
Martino Bertoni's avatar
Martino Bertoni committed
1
image: continuumio/miniconda3:latest
2

Martino Bertoni's avatar
Martino Bertoni committed
3
before_script:
Martino Bertoni's avatar
Martino Bertoni committed
4 5
    - python --version
    - export PIP_CACHE_DIR="/opt/cache/pip"
6
    - conda create --no-default-packages -n signaturizer_env -y python=3.7
Martino Bertoni's avatar
Martino Bertoni committed
7 8 9 10
    - source activate signaturizer_env
    - conda install -c conda-forge -y rdkit
    - pip install -r requirements.txt

Martino Bertoni's avatar
bugfix  
Martino Bertoni committed
11 12 13 14 15
stages:
  - test
  - test_deploy
  - deploy

Martino Bertoni's avatar
Martino Bertoni committed
16 17 18 19 20 21 22 23
unittest:
  stage: test
  script:
    - pwd
    - ls -l
    - export PYTHONPATH="$PYTHONPATH:."
    - python -c "import sys;print(sys.path)"
    - pytest
Martino Bertoni's avatar
Martino Bertoni committed
24 25

pypi_deploy_test:
Martino Bertoni's avatar
Martino Bertoni committed
26
  stage: test_deploy
Martino Bertoni's avatar
Martino Bertoni committed
27 28 29 30 31 32
  cache: {}
  script:
    - pip install -U twine
    - python setup.py sdist
    - twine upload --verbose --repository-url https://test.pypi.org/legacy/ dist/*
  only:
Martino Bertoni's avatar
Martino Bertoni committed
33 34 35 36 37 38 39 40
    - tags

pypi_deploy:
  stage: deploy
  cache: {}
  script:
    - pip install -U twine
    - python setup.py sdist
Martino Bertoni's avatar
Martino Bertoni committed
41
    - twine upload --verbose dist/*
Martino Bertoni's avatar
Martino Bertoni committed
42 43
  only:
    - tags