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

Sascha Herzinger's avatar
Sascha Herzinger committed
12
script:
Sascha Herzinger's avatar
Sascha Herzinger committed
13
14
15
16
17
18
19
20
    - 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
    - R -e 'source("https://bioconductor.org/biocLite.R"); biocLite(); biocLite("limma")'
    - redis-server --daemonize yes
    - rabbitmq-server -detached
    - celery worker -A fractalis:celery -D -l info
21

Sascha Herzinger's avatar
Sascha Herzinger committed
22
23
tests:
    stage: test
Sascha Herzinger's avatar
Sascha Herzinger committed
24
    script:
25
        - python3 setup.py test
26
        - flake8
Sascha Herzinger's avatar
Sascha Herzinger committed
27

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

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