.gitlab-ci.yml 1.23 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:
8
    - setup
Sascha Herzinger's avatar
Sascha Herzinger committed
9
    - test
Sascha Herzinger's avatar
Sascha Herzinger committed
10
    - publish
Sascha Herzinger's avatar
Sascha Herzinger committed
11
12
    - cleanup

13
14
15
16
17
18
19
20
21
install_deps:
    stage: setup
    script:
        - yum install -y epel-release
        - yum update -y
        - yum install -y rabbitmq-server redis python34 python34-pip python34-devel readline-devel R
        - pip3 install -e . -i https://pypi.lcsb.uni.lu/simple
        - pip3 install -r requirements.txt -i https://pypi.lcsb.uni.lu/simple
        - R -e 'source("https://bioconductor.org/biocLite.R"); biocLite(); biocLite("limma")'
22

Sascha Herzinger's avatar
Sascha Herzinger committed
23
24
tests:
    stage: test
Sascha Herzinger's avatar
Sascha Herzinger committed
25
    script:
26
27
28
        - redis-server --daemonize yes
        - rabbitmq-server -detached
        - celery worker -A fractalis:celery -D -l info
29
        - python3 setup.py test
30
        - flake8
31
32
    dependencies:
        - install_deps
Sascha Herzinger's avatar
Sascha Herzinger committed
33

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

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