]> kaliko git repositories - mpd-sima.git/blob - .gitlab-ci.yml
doc: publish html target uses setuptools build
[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: Security/SAST.gitlab-ci.yml
9
10 variables:
11   #XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache"
12   PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache"
13
14 cache:
15   paths:
16     - .cache
17
18 stages:
19   - test
20   - build
21
22 smoketest:
23   stage: test
24   script:
25   - pip install requests python-musicpd sphinx
26   - python setup.py test
27   # build wheel and source
28   - python setup.py bdist_wheel sdist
29   # manual and HTML documentation
30   - python setup.py build_sphinx
31   # install
32   - pip install dist/*.whl
33   # smoke test
34   - mpd-sima --help
35   artifacts:
36     expire_in: 1 hour
37     paths:
38     - dist/*.whl
39     - dist/*.tar.gz
40     - dist/*.zip
41
42 unittests:
43   stage: test
44   script:
45   - pip install pytest-cov requests python-musicpd
46   - py.test -q --cov=sima --junitxml=report.xml tests
47   artifacts:
48     when: always
49     reports:
50       junit: report.xml
51
52 vinstall:
53   stage: test
54   script:
55   # test virtualenv install
56   - python3 ./vinstall.py
57   # smoke test
58   - ./vmpd-sima --help
59   artifacts:
60     expire_in: 1 hour
61
62 sast:
63   variables:
64     SAST_EXCLUDED_ANALYZERS: brakeman, eslint, flawfinder, gosec, kubesec, nodejs-scan,
65       phpcs-security-audit, pmd-apex, security-code-scan, semgrep, sobelow, spotbugs
66   stage: test
67
68 tag_release:
69   stage: build
70   dependencies:
71     - smoketest
72   script:
73     - python -V
74   artifacts:
75     paths:
76     - dist/*.whl
77     - dist/*.tar.gz
78     - dist/*.zip
79     name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG"
80   cache: {}
81   only:
82     - tags