.gitlab-ci.yml 1.08 KB
Newer Older
1
image: centos:latest
Sascha Herzinger's avatar
Sascha Herzinger committed
2

Sascha Herzinger's avatar
Sascha Herzinger committed
3
4
5
variables:
    PYPI_USER: SECURE
    PYPI_PASSWORD: SECURE
6

Sascha Herzinger's avatar
Sascha Herzinger committed
7
stages:
Sascha Herzinger's avatar
Sascha Herzinger committed
8
9
    - test
    - deploy
Sascha Herzinger's avatar
Sascha Herzinger committed
10
11
12
13
14
15
16
17
18
19
20
21
22
23
    - cleanup

before_script:
    # add epel-repo to centos
    - yum install -y epel-release
    - yum update -y
    # install dependencies
    - yum install -y rabbitmq-server redis python34 python34-pip python34-devel readline-devel R
    - pip3 install -e . -i https://pypi.lcsb.uni.lu/simple
    - R -e 'source("https://bioconductor.org/biocLite.R"); biocLite(); biocLite("limma")'
    # start services
    - redis-server --daemonize yes
    - rabbitmq-server -detached
    - celery worker -A fractalis:celery -D -l info
24

Sascha Herzinger's avatar
Sascha Herzinger committed
25
26
tests:
    stage: test
Sascha Herzinger's avatar
Sascha Herzinger committed
27
    script:
28
        - python3 setup.py test
29
        - flake8
Sascha Herzinger's avatar
Sascha Herzinger committed
30
31
32

pypi_package:
    stage: deploy
Sascha Herzinger's avatar
Sascha Herzinger committed
33
34
    script:
        - echo "[server-login]" > ~/.pypirc
Sascha Herzinger's avatar
Sascha Herzinger committed
35
36
        - echo "username=" ${PYPI_USER} >> ~/.pypirc
        - echo "password=" ${PYPI_PASSWORD} >> ~/.pypirc
Sascha Herzinger's avatar
Sascha Herzinger committed
37
        - python3 setup.py check sdist upload
Sascha Herzinger's avatar
Sascha Herzinger committed
38
39
40
41
    only:
        tags
    except:
        branches
Sascha Herzinger's avatar
Sascha Herzinger committed
42
43
44
45
46
47

rm_secrets:
    stage: cleanup
    when: always
    script:
        - rm -f ~/.pypirc