.gitlab-ci.yml 1.28 KB
Newer Older
Yann Leboulanger's avatar
Yann Leboulanger committed
1
before_script:
Philipp Hörist's avatar
Philipp Hörist committed
2
  - sudo apt-get update -qq && sudo apt-get install -y -qq libtool pkg-config gir1.2-gtk-3.0 gir1.2-soup-2.4 python3-gi python3-cairo
Yann Leboulanger's avatar
Yann Leboulanger committed
3 4 5 6 7 8
  - sudo apt-get build-dep -y -qq gajim-default-nightly

stages:
  - test
  - build

Philipp Hörist's avatar
Philipp Hörist committed
9
run-tests:
Philipp Hörist's avatar
Philipp Hörist committed
10 11
  stage: test
  script:
Philipp Hörist's avatar
Philipp Hörist committed
12
    - rm -rf civenv-master
13
    - virtualenv -p python3 --system-site-packages civenv
Philipp Hörist's avatar
Philipp Hörist committed
14
    - . ./civenv/bin/activate
15 16 17
    - pip3 install -I mypy
    - pip3 install -I git+https://dev.gajim.org/gajim/python-nbxmpp.git@master
    - pip3 install -I pylint==2.4.4
Philipp Hörist's avatar
Philipp Hörist committed
18
    - mypy -V
19
    - mypy gajim
Marcin Mielniczuk's avatar
Marcin Mielniczuk committed
20
    - scripts/dev/pylint-ci.sh --jobs=2 gajim
André's avatar
André committed
21
    - python3 -m unittest discover -s test/no_gui -v
Philipp Hörist's avatar
Philipp Hörist committed
22 23
    - deactivate
    - rm -rf civenv-master
Yann Leboulanger's avatar
Yann Leboulanger committed
24

25 26 27 28 29
run-appdata:
  stage: test
  script:
    - appstream-util validate data/org.gajim.Gajim.appdata.xml.in

Yann Leboulanger's avatar
Yann Leboulanger committed
30 31 32
run-build:
  stage: build
  script:
André's avatar
André committed
33 34
    - python3 setup.py sdist
    - cd dist
André's avatar
André committed
35 36
    - GF=$(basename gajim-* .tar.gz)
    - gzip -d $GF.tar.gz
37
    - mkdir -p $GF/gajim/data/plugins/
Yann Leboulanger's avatar
Yann Leboulanger committed
38
    - curl -O https://ftp.gajim.org/plugins_1/plugin_installer.zip
André's avatar
André committed
39
    - unzip plugin_installer.zip -d $GF/gajim/data/plugins/
Yann Leboulanger's avatar
Yann Leboulanger committed
40
    - rm plugin_installer.zip
André's avatar
André committed
41 42
    - tar -uf $GF.tar $GF
    - gzip $GF.tar
Yann Leboulanger's avatar
Yann Leboulanger committed
43 44

  artifacts:
André's avatar
André committed
45
    name: "gajim-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA"
Yann Leboulanger's avatar
Yann Leboulanger committed
46 47
    expire_in: 1 week
    paths:
André's avatar
André committed
48
      - dist/gajim-*.tar.gz