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

mathieui's avatar
mathieui committed
6 7
build-doc:
  stage: build
8
  only:
Maxime Buquet's avatar
Maxime Buquet committed
9
    - main@poezio/poezio
10 11
  tags:
    - www
12
  image: python:3
mathieui's avatar
mathieui committed
13
  script:
14
    - ./update.sh
15
    - . ./poezio-venv/bin/activate
16
    - pip install sphinx --ignore-installed
mathieui's avatar
mathieui committed
17
    - make doc
18 19
    - rm -rf /www/latest
    - mv doc/build/html/ /www/latest
20

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

34
security-check:
35
  stage: lint
36 37 38 39 40
  image: python:3
  script:
    - pip3 install safety
    - safety check -r requirements.txt

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

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

67
pytest-3.9:
mathieui's avatar
mathieui committed
68
  stage: test
69 70 71 72 73 74 75 76 77 78 79 80 81 82
  image: python:3.9
  script:
    - apt-get update && apt-get install -y libidn11-dev
    - git clone https://lab.louiz.org/poezio/slixmpp.git
    - pip3 install pytest pyasn1-modules cffi --upgrade
    - cd slixmpp
    - python3 setup.py install
    - cd ..
    - python3 setup.py install
    - py.test -v test/

pytest-3.10:
  stage: test
  image: python:3.10-rc
louiz’'s avatar
louiz’ committed
83
  script:
mathieui's avatar
mathieui committed
84
    - apt-get update && apt-get install -y libidn11-dev
mathieui's avatar
mathieui committed
85
    - git clone https://lab.louiz.org/poezio/slixmpp.git
mathieui's avatar
mathieui committed
86 87
    - pip3 install pytest pyasn1-modules cffi --upgrade
    - cd slixmpp
louiz’'s avatar
louiz’ committed
88
    - python3 setup.py install
mathieui's avatar
mathieui committed
89
    - cd ..
mathieui's avatar
mathieui committed
90 91
    - python3 setup.py install
    - py.test -v test/
mathieui's avatar
mathieui committed
92

93
pylint-latest:
94
  stage: lint
95 96 97
  image: python:3
  script:
    - apt-get update && apt-get install -y libidn11-dev
mathieui's avatar
mathieui committed
98
    - git clone https://lab.louiz.org/poezio/slixmpp.git
99 100 101 102 103 104 105
    - pip3 install pylint pyasn1-modules cffi --upgrade
    - cd slixmpp
    - python3 setup.py install
    - cd ..
    - python3 setup.py install
    - pylint -E poezio

mathieui's avatar
mathieui committed
106
pylint-plugins:
107
  stage: lint
mathieui's avatar
mathieui committed
108 109 110 111 112
  image: python:3
  allow_failure: true
  script:
    - apt-get update && apt-get install -y libidn11-dev
    - pip3 install pylint pyasn1-modules cffi --upgrade
mathieui's avatar
mathieui committed
113
    - pip3 install -e git+https://lab.louiz.org/poezio/slixmpp.git#egg=slixmpp
mathieui's avatar
mathieui committed
114 115 116
    - pip3 install -r requirements-plugins.txt
    - python3 setup.py install
    - pylint -E plugins
117

mathieui's avatar
mathieui committed
118
mypy:
119 120 121
  stage: lint
  image: python:3
  script:
mathieui's avatar
mathieui committed
122
    - pip3 install mypy
123 124 125
    - pip install "typed_ast>=1.4.0,<1.5.0" types-pkg_resources
    - mypy --ignore-missing-imports ./poezio
    - mypy --ignore-missing-imports ./plugins