.gitlab-ci.yml 2.47 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
mathieui's avatar
mathieui committed
14
    - make doc
15 16
    - rm -rf /www/latest
    - mv doc/build/html/ /www/latest
17

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

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

mathieui's avatar
mathieui committed
38
pytest-3.5:
mathieui's avatar
mathieui committed
39
  stage: test
mathieui's avatar
mathieui committed
40 41 42 43 44 45 46 47 48 49 50
  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/

51
pytest-3.6:
mathieui's avatar
mathieui committed
52 53 54 55 56 57 58 59 60 61 62 63
  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/

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

mathieui's avatar
mathieui committed
77
pylint-latest:
mathieui's avatar
mathieui committed
78 79 80 81 82 83 84 85 86 87
  stage: test
  image: python:3
  script:
    - apt-get update && apt-get install -y libidn11-dev
    - git clone git://git.louiz.org/slixmpp
    - pip3 install pylint pyasn1-modules cffi --upgrade
    - cd slixmpp
    - python3 setup.py install
    - cd ..
    - python3 setup.py install
mathieui's avatar
mathieui committed
88
    - pylint -E poezio
mathieui's avatar
mathieui committed
89

mathieui's avatar
mathieui committed
90 91 92 93 94 95 96
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
97
    - pip3 install -e git+git://git.louiz.org/slixmpp#egg=slixmpp
mathieui's avatar
mathieui committed
98 99 100 101
    - pip3 install -r requirements-plugins.txt
    - python3 setup.py install
    - pylint -E plugins

mathieui's avatar
mathieui committed
102 103
formatting-check:
  stage: test
mathieui's avatar
mathieui committed
104
  image: python:3
mathieui's avatar
mathieui committed
105
  allow_failure: true
mathieui's avatar
mathieui committed
106 107
  script:
    - pip3 install yapf
108
    - yapf -dpr poezio
mathieui's avatar
mathieui committed
109
    - "[ -n \"$(yapf -dpr poezio)\" ] && echo 'Formatting check failed, please run yapf' && exit 1 || echo 'Formatting check succeeded'"