.gitlab-ci.yml 2.18 KB
Newer Older
mathieui's avatar
mathieui committed
1 2
stages:
  - test
3
  - build
mathieui's avatar
mathieui committed
4

mathieui's avatar
mathieui committed
5 6
build-doc:
  stage: build
7 8 9 10 11
  only:
    - branches@poezio/poezio
  tags:
    - www
  image: docker.louiz.org/poezio/poezio/doc-builder
mathieui's avatar
mathieui committed
12
  script:
13
    - ./update.sh
14
    - . ./poezio-venv/bin/activate
mathieui's avatar
mathieui committed
15
    - make doc
16 17
    - rm -rf /www/latest
    - mv doc/build/html/ /www/latest
18

mathieui's avatar
mathieui committed
19 20
build-ubuntu:
  stage: build
mathieui's avatar
mathieui committed
21
  image: python:3
mathieui's avatar
mathieui committed
22 23 24 25 26 27 28
  script:
    - python3 setup.py sdist
    - python3 setup.py bdist
  artifacts:
    expire_in: 2 weeks
    paths:
      - dist/
mathieui's avatar
mathieui committed
29 30
  only:
    - master
mathieui's avatar
mathieui committed
31

32 33 34 35 36 37 38
security-check:
  stage: test
  image: python:3
  script:
    - pip3 install safety
    - safety check -r requirements.txt

mathieui's avatar
mathieui committed
39
pytest-3.5:
mathieui's avatar
mathieui committed
40
  stage: test
mathieui's avatar
mathieui committed
41 42 43 44 45 46 47 48 49 50 51
  image: python:3.5
  script:
    - apt-get update && apt-get install -y libidn11-dev
    - git clone git://git.louiz.org/slixmpp
    - pip3 install pytest pyasn1-modules cffi --upgrade
    - cd slixmpp
    - python3 setup.py install
    - cd ..
    - python3 setup.py install
    - py.test -v test/

52
pytest-3.6:
mathieui's avatar
mathieui committed
53 54 55 56 57 58 59 60 61 62 63 64
  stage: test
  image: python:3.6
  script:
    - apt-get update && apt-get install -y libidn11-dev
    - git clone git://git.louiz.org/slixmpp
    - pip3 install pytest pyasn1-modules cffi --upgrade
    - cd slixmpp
    - python3 setup.py install
    - cd ..
    - python3 setup.py install
    - py.test -v test/

65
pytest-latest:
mathieui's avatar
mathieui committed
66
  stage: test
mathieui's avatar
mathieui committed
67
  image: python:3
louiz’'s avatar
louiz’ committed
68
  script:
mathieui's avatar
mathieui committed
69
    - apt-get update && apt-get install -y libidn11-dev
louiz’'s avatar
louiz’ committed
70
    - git clone git://git.louiz.org/slixmpp
mathieui's avatar
mathieui committed
71 72
    - pip3 install pytest pyasn1-modules cffi --upgrade
    - cd slixmpp
louiz’'s avatar
louiz’ committed
73
    - python3 setup.py install
mathieui's avatar
mathieui committed
74
    - cd ..
mathieui's avatar
mathieui committed
75 76
    - python3 setup.py install
    - py.test -v test/
mathieui's avatar
mathieui committed
77

mathieui's avatar
mathieui committed
78 79 80 81 82 83 84
pylint-plugins:
  stage: test
  image: python:3
  allow_failure: true
  script:
    - apt-get update && apt-get install -y libidn11-dev
    - pip3 install pylint pyasn1-modules cffi --upgrade
85
    - pip3 install -e git+git://git.louiz.org/slixmpp#egg=slixmpp
mathieui's avatar
mathieui committed
86 87 88 89
    - pip3 install -r requirements-plugins.txt
    - python3 setup.py install
    - pylint -E plugins

mathieui's avatar
mathieui committed
90 91
formatting-check:
  stage: test
mathieui's avatar
mathieui committed
92
  image: python:3
mathieui's avatar
mathieui committed
93
  allow_failure: true
mathieui's avatar
mathieui committed
94 95
  script:
    - pip3 install yapf
96
    - yapf -dpr poezio
mathieui's avatar
mathieui committed
97
    - "[ -n \"$(yapf -dpr poezio)\" ] && echo 'Formatting check failed, please run yapf' && exit 1 || echo 'Formatting check succeeded'"