.gitlab-ci.yml 1.51 KB
Newer Older
Yann Leboulanger's avatar
Yann Leboulanger committed
1
before_script:
Marcin Mielniczuk's avatar
Marcin Mielniczuk committed
2
  - sudo apt-get update -qq && sudo apt-get install -y -qq libtool pkg-config python3-openssl gir1.2-gtk-3.0 python3-gi python3-nbxmpp-nightly python3-cairo python3-pip
Yann Leboulanger's avatar
Yann Leboulanger committed
3
  - sudo apt-get build-dep -y -qq gajim-default-nightly
Marcin Mielniczuk's avatar
Marcin Mielniczuk committed
4
  - sudo pip3 install pylint==2.1.1
Yann Leboulanger's avatar
Yann Leboulanger committed
5
6
7
8
9
10
11
12

stages:
  - test
  - build

run-test:
  stage: test
  script:
André's avatar
André committed
13
    - python3 setup.py test_nogui
Yann Leboulanger's avatar
Yann Leboulanger committed
14

Philipp Hörist's avatar
Philipp Hörist committed
15
16
17
run-mypy:
  stage: test
  script:
Philipp Hörist's avatar
Philipp Hörist committed
18
    - mypy gajim
Philipp Hörist's avatar
Philipp Hörist committed
19

Yann Leboulanger's avatar
Yann Leboulanger committed
20
21
22
run-pylint:
  stage: test
  script:
Marcin Mielniczuk's avatar
Marcin Mielniczuk committed
23
24
25
    - pylint3 --version
    - pylint --version
    - scripts/dev/pylint-ci.sh --jobs=2 gajim
Yann Leboulanger's avatar
Yann Leboulanger committed
26

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

Yann Leboulanger's avatar
Yann Leboulanger committed
32
33
34
run-build:
  stage: build
  script:
André's avatar
André committed
35
36
    - python3 setup.py sdist
    - cd dist
Yann Leboulanger's avatar
Yann Leboulanger committed
37
38
39
40
41
42
43
44
    - export FN="gajim-default-"$(date +%F)".tar"
    - mv gajim-*.tar.gz $FN.gz
    - mkdir tmp_add_plugins
    - mv $FN.gz tmp_add_plugins/
    - cd tmp_add_plugins/
    - tar xzf $FN.gz
    - rm $FN.gz
    - export GF=$(find . -maxdepth 1 -type d -name 'gajim-*')
45
46
    - mkdir -p $GF/gajim/data/plugins/
    - cd $GF/gajim/data/plugins/
Yann Leboulanger's avatar
Yann Leboulanger committed
47
48
49
    - curl -O https://ftp.gajim.org/plugins_1/plugin_installer.zip
    - unzip plugin_installer.zip
    - rm plugin_installer.zip
50
    - cd ../../../..
Yann Leboulanger's avatar
Yann Leboulanger committed
51
52
53
    - tar czf ../$FN.gz gajim-*
    - cd ..
    - rm -rf tmp_add_plugins
Yann Leboulanger's avatar
Yann Leboulanger committed
54
    - scp $FN.gz panoramix:/var/www/gajim/downloads/snap/ci/gajim-default-$CI_COMMIT_SHA.tar.gz
Yann Leboulanger's avatar
Yann Leboulanger committed
55
56
57
58
59
60

  artifacts:
    name: "gajim-default-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA"
    expire_in: 1 week
    paths:
      - gajim-default-2???-??-??.tar.gz