]> kaliko git repositories - mpd-sima.git/blob - .gitlab-ci.yml
Cleanup PlayerError exception wrapper
[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   - sphinx-build -d ./build/doctrees doc/source -b man ./build/man/
33   - sphinx-build -d ./build/doctrees doc/source -b html ./build/html/
34   # install
35   - pip install dist/*.whl
36   # smoke test
37   - mpd-sima --help
38   - TRACE=y ./mpd-sima -d --pid ./mpd-sima.pid -l ./mpd-sima.log
39   - sleep 10
40   - test -f ./mpd-sima.pid && kill $(cat ./mpd-sima.pid)
41   artifacts:
42     expire_in: 1 hour
43     paths:
44     - dist/*.whl
45     - dist/*.tar.gz
46     - dist/*.zip
47     - ./mpd-sima.pid
48     - ./mpd-sima.log
49
50 unittests:
51   stage: test
52   script:
53   - pip install pytest-cov requests python-musicpd
54   - py.test -q --cov=sima --junitxml=report.xml tests
55   coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
56   artifacts:
57     when: always
58     reports:
59       junit: report.xml
60
61 tag_release:
62   stage: build
63   dependencies:
64     - smoketest
65   script:
66     - python -V
67   artifacts:
68     paths:
69     - dist/*.whl
70     - dist/*.tar.gz
71     - dist/*.zip
72     name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG"
73   cache: {}
74   only:
75     - tags