]> kaliko git repositories - mpd-sima.git/blob - .gitlab-ci.yml
Integrate pylint-gitlab and dependency scanning
[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
9 variables:
10   #XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache"
11   PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache"
12
13 cache:
14   paths:
15     - .cache
16
17 stages:
18   - test
19   - build
20
21 smoketest:
22   stage: test
23   script:
24   - pip install pytest-cov requests
25   - py.test -q --cov=sima tests
26   - python setup.py test
27   # build wheel and source
28   - python setup.py bdist_wheel sdist
29   # install
30   - pip install dist/*.whl
31   # smoke test
32   - mpd-sima --help
33   artifacts:
34     expire_in: 1 hour
35     paths:
36     - dist/*.whl
37     - dist/*.tar.gz
38     - dist/*.zip
39
40 vinstall:
41   stage: test
42   script:
43   # test virtualenv install
44   - python3 ./vinstall.py
45   # smoke test
46   - ./vmpd-sima --help
47   artifacts:
48     expire_in: 1 hour
49
50 tag_release:
51   stage: build
52   dependencies:
53     - smoketest
54   script:
55     - python -V
56   artifacts:
57     paths:
58     - dist/*.whl
59     - dist/*.tar.gz
60     - dist/*.zip
61     name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG"
62   cache: {}
63   only:
64     - tags