.gitlab-ci.yml 1.39 KB
Newer Older
Andreas Valder's avatar
Andreas Valder committed
1 2 3 4 5 6 7 8
linter:
    image: debian:stretch
    stage: test
    script:
    - apt update
    - apt install -y python3
    - python3 -V
    - uname -a
Andreas Valder's avatar
Andreas Valder committed
9 10
    - apt install -y sqlite3 locales-all git python3-flask python3-ldap3 python3-requests python3-lxml python3-icalendar python3-mysql.connector python3-requests python3-coverage pylint3
    - pylint3 --indent-string='\t' --indent-after-paren=1 --output-format=text *.py | tee pylint.txt
Andreas Valder's avatar
Andreas Valder committed
11 12 13 14
    artifacts:
        paths:
        - pylint.txt

Andreas Valder's avatar
Andreas Valder committed
15
unittest:
16
    image: debian:stretch
Andreas Valder's avatar
Andreas Valder committed
17 18
    stage: test
    script:
19
    - apt update
Andreas Valder's avatar
Andreas Valder committed
20
    - apt install -y python3
21 22
    - python3 -V
    - uname -a
Andreas Valder's avatar
Andreas Valder committed
23
    - apt install -y sqlite3 locales-all git python3-flask python3-ldap3 python3-requests python3-lxml python3-icalendar python3-mysql.connector python3-requests python3-coverage
24
    - python3 -m coverage run runTests.py
Andreas Valder's avatar
Andreas Valder committed
25 26
    - python3 -m coverage report --include "./*"
    - python3 -m coverage report -m  --include "./*" > report.txt
Andreas Valder's avatar
Andreas Valder committed
27
    - python3 -m coverage html --include "./*"
Andreas Valder's avatar
Andreas Valder committed
28 29
    artifacts:
        paths:
Andreas Valder's avatar
Andreas Valder committed
30 31
        - htmlcov/*
        - .coverage
Andreas Valder's avatar
Andreas Valder committed
32 33 34
        - report.txt

livetest:
35
    image: debian:stretch
Andreas Valder's avatar
Andreas Valder committed
36 37
    stage: test
    script:
38
    - apt update
Andreas Valder's avatar
Andreas Valder committed
39
    - apt install -y python3
40 41
    - python3 -V
    - uname -a
Andreas Valder's avatar
Andreas Valder committed
42
    - apt install -y python3-requests
Andreas Valder's avatar
Andreas Valder committed
43
#    - ./tests/urlcheck_sinf.py
44

45
deploy_staging:
Andreas Valder's avatar
Andreas Valder committed
46
    image: archlinux/base
47 48
    stage: deploy
    script:
Andreas Valder's avatar
Andreas Valder committed
49
    - pacman --noconfirm -Sy ansible git
50