.gitlab-ci.yml 892 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
6
7
8
9
10
    - python --version
    - export PIP_CACHE_DIR="/opt/cache/pip"
    - conda create --no-default-packages -n signaturizer_env -y python
    - 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