]> kaliko git repositories - mpd-sima.git/blob - .gitlab-ci.yml
ci: Fixed sast
[mpd-sima.git] / .gitlab-ci.yml
1 # Official language image. Look for the different tagged releases at:
2 # https://hub.docker.com/_/python
3 image: python:3
4
5 include:
6   - local: .gitlab/gitlab-templates.yml
7   - local: .gitlab/pylint.yml
8   - template: Jobs/SAST.gitlab-ci.yml
9
10 variables:
11   #XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache"
12   PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache"
13   SAST_EXCLUDED_ANALYZERS: brakeman, flawfinder, kubesec, mobsf, nodejs-scan,
14     phpcs-security-audit, pmd-apex, sobelow, spotbugs
15
16 cache:
17   paths:
18     - .cache
19
20 stages:
21   - test
22   - build
23
24 smoketest:
25   stage: test
26   script:
27   - pip install requests python-musicpd sphinx
28   - python setup.py test
29   # build wheel and source
30   - python setup.py bdist_wheel sdist
31   # manual and HTML documentation
32   - python setup.py build_sphinx
33   # install
34   - pip install dist/*.whl
35   # smoke test
36   - mpd-sima --help
37   - TRACE=y ./mpd-sima -d --pid ./mpd-sima.pid -l ./mpd-sima.log
38   - sleep 10
39   - test -f ./mpd-sima.pid && kill $(cat ./mpd-sima.pid)
40   artifacts:
41     expire_in: 1 hour
42     paths:
43     - dist/*.whl
44     - dist/*.tar.gz
45     - dist/*.zip
46     - ./mpd-sima.pid
47     - ./mpd-sima.log
48
49 unittests:
50   stage: test
51   script:
52   - pip install pytest-cov requests python-musicpd
53   - py.test -q --cov=sima --junitxml=report.xml tests
54   coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
55   artifacts:
56     when: always
57     reports:
58       junit: report.xml
59
60 vinstall:
61   stage: test
62   script:
63   # test virtualenv install
64   - python3 ./vinstall.py
65   # smoke test
66   - ./vmpd-sima --help
67   artifacts:
68     expire_in: 1 hour
69
70 tag_release:
71   stage: build
72   dependencies:
73     - smoketest
74   script:
75     - python -V
76   artifacts:
77     paths:
78     - dist/*.whl
79     - dist/*.tar.gz
80     - dist/*.zip
81     name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG"
82   cache: {}
83   only:
84     - tags