.gitlab-ci.yml 718 Bytes
Newer Older
Philipp Hörist's avatar
Philipp Hörist committed
1
image: ci-nbxmpp:master
Yann Leboulanger's avatar
Yann Leboulanger committed
2
3
4
5

stages:
  - test
  - build
Philipp Hörist's avatar
Philipp Hörist committed
6
  - deploy
Yann Leboulanger's avatar
Yann Leboulanger committed
7

Philipp Hörist's avatar
Philipp Hörist committed
8
test-pylint:
Yann Leboulanger's avatar
Yann Leboulanger committed
9
10
  stage: test
  script:
11
    - python3 .ci/pylint-test.py
André's avatar
André committed
12
13
14
    - coverage run --source=nbxmpp -m unittest discover -v
    - coverage report -mi
    - coverage xml -i
Philipp Hörist's avatar
Philipp Hörist committed
15
    - pip install .
André's avatar
André committed
16
17
18
19
  coverage: "/TOTAL.+ ([0-9]{1,3}%)/"
  artifacts:
    reports:
      cobertura: coverage.xml
Yann Leboulanger's avatar
Yann Leboulanger committed
20

Philipp Hörist's avatar
Philipp Hörist committed
21
build-linux:
Yann Leboulanger's avatar
Yann Leboulanger committed
22
23
  stage: build
  script:
Yann Leboulanger's avatar
Yann Leboulanger committed
24
    - python3 setup.py sdist
Philipp Hörist's avatar
Philipp Hörist committed
25
    - python3 .ci/debian_build.py "$(find dist/nbxmpp-*)" 1 --pkgprefix=python3-
Yann Leboulanger's avatar
Yann Leboulanger committed
26
27
28
29
30
31

  artifacts:
    name: "nbxmpp-$CI_COMMIT_SHA"
    expire_in: 1 week
    paths:
      - dist/nbxmpp-*.tar.gz
Philipp Hörist's avatar
Philipp Hörist committed
32
33
34
35
36
37
38

deploy-pypi:
  stage: deploy
  rules:
    - if: '$CI_COMMIT_TAG'
  script:
    - python3 .ci/deploy.py