.gitlab-ci.yml 1.81 KB
Newer Older
1 2
variables:
  CONTAINER_REGISTRY: $CI_REGISTRY/georg/mat2-ci-images
jvoisin's avatar
jvoisin committed
3

jvoisin's avatar
jvoisin committed
4 5 6 7
stages:
  - linting
  - test

8
linting:bandit:
9
  image: $CONTAINER_REGISTRY:linting 
jvoisin's avatar
jvoisin committed
10
  stage: linting
11
  script:  # TODO: remove B405 and B314
12 13 14
    - bandit ./mat2 --format txt --skip B101
    - bandit -r ./nautilus/ --format txt --skip B101
    - bandit -r ./libmat2 --format txt --skip B101,B404,B603,B405,B314
jvoisin's avatar
jvoisin committed
15

16
linting:pylint:
17
  image: $CONTAINER_REGISTRY:linting
jvoisin's avatar
jvoisin committed
18 19
  stage: linting
  script:
20 21 22
    - pylint3 --disable=no-else-return --extension-pkg-whitelist=cairo,gi ./libmat2 ./mat2
    # Once nautilus-python is in Debian, decomment it form the line below
    - pylint3 --disable=no-else-return --extension-pkg-whitelist=Nautilus,GObject,Gtk,Gio,GLib,gi ./nautilus/mat2.py
jvoisin's avatar
jvoisin committed
23

24
linting:pyflakes:
25
  image: $CONTAINER_REGISTRY:linting
jvoisin's avatar
jvoisin committed
26 27
  stage: linting
  script:
28
    - pyflakes3 ./libmat2 ./mat2 ./tests/ ./nautilus
jvoisin's avatar
jvoisin committed
29

30
linting:mypy:
31
  image: $CONTAINER_REGISTRY:linting
32 33
  stage: linting
  script:
34
    - mypy --ignore-missing-imports mat2 libmat2/*.py ./nautilus/mat2.py
35

36 37 38 39 40 41
tests:archlinux:
  image: $CONTAINER_REGISTRY:archlinux
  stage: test
  script:
    - python3 setup.py test
  
jvoisin's avatar
jvoisin committed
42
tests:debian:
43
  image: $CONTAINER_REGISTRY:debian
jvoisin's avatar
jvoisin committed
44
  stage: test
jvoisin's avatar
jvoisin committed
45
  script:
46 47 48
    - apt-get -qqy purge bubblewrap
    - python3-coverage run --branch -m unittest discover -s tests/
    - python3-coverage report --fail-under=90 -m --include 'libmat2/*'
49 50

tests:debian_with_bubblewrap:
51
  image: $CONTAINER_REGISTRY:debian
52 53
  stage: test
  script:
54 55
    - python3-coverage run --branch -m unittest discover -s tests/
    - python3-coverage report --fail-under=100 -m --include 'libmat2/*'
jvoisin's avatar
jvoisin committed
56 57

tests:fedora:
58
  image: $CONTAINER_REGISTRY:fedora
jvoisin's avatar
jvoisin committed
59 60
  stage: test
  script:
61
    - python3 setup.py test
jvoisin's avatar
jvoisin committed
62

63 64
tests:gentoo:
  image: $CONTAINER_REGISTRY:gentoo
jvoisin's avatar
jvoisin committed
65
  stage: test
jvoisin's avatar
jvoisin committed
66
  allow_failure: true
jvoisin's avatar
jvoisin committed
67
  script:
68
    - python3 -m unittest discover -v