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

Martino Bertoni's avatar
Martino Bertoni committed
3
stages:
Martino Bertoni's avatar
Martino Bertoni committed
4
  - build
Martino Bertoni's avatar
Martino Bertoni committed
5
  - test
Martino Bertoni's avatar
Martino Bertoni committed
6
  - test_deploy
Martino Bertoni's avatar
Martino Bertoni committed
7
  - deploy
Martino Bertoni's avatar
Martino Bertoni committed
8

Martino Bertoni's avatar
Martino Bertoni committed
9
10
11
12
13
14
15
16
17
18
build_enviroment:
  stage: build
  script:
    - 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
Martino Bertoni committed
19
20
21
22
23
24
25
26
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
27
28

pypi_deploy_test:
Martino Bertoni's avatar
Martino Bertoni committed
29
  stage: test_deploy
Martino Bertoni's avatar
Martino Bertoni committed
30
31
32
33
34
35
  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
36
37
38
39
40
41
42
43
    - tags

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