summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgeorg2019-03-09 04:15:10 -0800
committerjvoisin2019-03-09 04:15:10 -0800
commit2dc097baf326bfdb1c09d7a50db72a42b278cbe9 (patch)
tree8d07f866b1b63c6787eafb06fd205c390b86a8c7
parente40eb92b552c662d8471736e91437aa370565e05 (diff)
CI: Add job to run tests on gentoo
Closes #93
-rw-r--r--.gitlab-ci.yml48
1 files changed, 27 insertions, 21 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0adeb04..7d6d70c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,57 +5,63 @@ stages:
5 - linting 5 - linting
6 - test 6 - test
7 7
8bandit: 8linting:bandit:
9 image: $CONTAINER_REGISTRY:linting 9 image: $CONTAINER_REGISTRY:linting
10 stage: linting 10 stage: linting
11 script: # TODO: remove B405 and B314 11 script: # TODO: remove B405 and B314
12 - bandit ./mat2 --format txt --skip B101 12 - bandit ./mat2 --format txt --skip B101
13 - bandit -r ./nautilus/ --format txt --skip B101 13 - bandit -r ./nautilus/ --format txt --skip B101
14 - bandit -r ./libmat2 --format txt --skip B101,B404,B603,B405,B314 14 - bandit -r ./libmat2 --format txt --skip B101,B404,B603,B405,B314
15 15
16pylint: 16linting:pylint:
17 image: $CONTAINER_REGISTRY:linting 17 image: $CONTAINER_REGISTRY:linting
18 stage: linting 18 stage: linting
19 script: 19 script:
20 - pylint3 --disable=no-else-return --extension-pkg-whitelist=cairo,gi ./libmat2 ./mat2 20 - pylint3 --disable=no-else-return --extension-pkg-whitelist=cairo,gi ./libmat2 ./mat2
21 # Once nautilus-python is in Debian, decomment it form the line below 21 # Once nautilus-python is in Debian, decomment it form the line below
22 - pylint3 --disable=no-else-return --extension-pkg-whitelist=Nautilus,GObject,Gtk,Gio,GLib,gi ./nautilus/mat2.py 22 - pylint3 --disable=no-else-return --extension-pkg-whitelist=Nautilus,GObject,Gtk,Gio,GLib,gi ./nautilus/mat2.py
23 23
24pyflakes: 24linting:pyflakes:
25 image: $CONTAINER_REGISTRY:linting 25 image: $CONTAINER_REGISTRY:linting
26 stage: linting 26 stage: linting
27 script: 27 script:
28 - pyflakes3 ./libmat2 ./mat2 ./tests/ ./nautilus 28 - pyflakes3 ./libmat2 ./mat2 ./tests/ ./nautilus
29 29
30mypy: 30linting:mypy:
31 image: $CONTAINER_REGISTRY:linting 31 image: $CONTAINER_REGISTRY:linting
32 stage: linting 32 stage: linting
33 script: 33 script:
34 - mypy --ignore-missing-imports mat2 libmat2/*.py ./nautilus/mat2.py 34 - mypy --ignore-missing-imports mat2 libmat2/*.py ./nautilus/mat2.py
35 35
36tests:archlinux:
37 image: $CONTAINER_REGISTRY:archlinux
38 stage: test
39 script:
40 - python3 setup.py test
41
36tests:debian: 42tests:debian:
37 image: $CONTAINER_REGISTRY:debian 43 image: $CONTAINER_REGISTRY:debian
38 stage: test 44 stage: test
39 script: 45 script:
40 - apt-get -qqy purge bubblewrap 46 - apt-get -qqy purge bubblewrap
41 - python3-coverage run --branch -m unittest discover -s tests/ 47 - python3-coverage run --branch -m unittest discover -s tests/
42 - python3-coverage report --fail-under=90 -m --include 'libmat2/*' 48 - python3-coverage report --fail-under=90 -m --include 'libmat2/*'
43 49
44tests:debian_with_bubblewrap: 50tests:debian_with_bubblewrap:
45 image: $CONTAINER_REGISTRY:debian 51 image: $CONTAINER_REGISTRY:debian
46 stage: test 52 stage: test
47 script: 53 script:
48 - python3-coverage run --branch -m unittest discover -s tests/ 54 - python3-coverage run --branch -m unittest discover -s tests/
49 - python3-coverage report --fail-under=100 -m --include 'libmat2/*' 55 - python3-coverage report --fail-under=100 -m --include 'libmat2/*'
50 56
51tests:fedora: 57tests:fedora:
52 image: $CONTAINER_REGISTRY:fedora 58 image: $CONTAINER_REGISTRY:fedora
53 stage: test 59 stage: test
54 script: 60 script:
55 - python3 setup.py test 61 - python3 setup.py test
56 62
57tests:archlinux: 63tests:gentoo:
58 image: $CONTAINER_REGISTRY:archlinux 64 image: $CONTAINER_REGISTRY:gentoo
59 stage: test 65 stage: test
60 script: 66 script:
61 - python3 setup.py test 67 - python3 -m unittest discover -v