]> kaliko git repositories - mpd-sima.git/blob - .gitlab-ci.yml
Use MusicBrainz_albumid for album search (Closes #30)
[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 requests
25   - python setup.py test
26   # build wheel and source
27   - python setup.py bdist_wheel sdist
28   # install
29   - pip install dist/*.whl
30   # smoke test
31   - mpd-sima --help
32   artifacts:
33     expire_in: 1 hour
34     paths:
35     - dist/*.whl
36     - dist/*.tar.gz
37     - dist/*.zip
38
39 unittests:
40   stage: test
41   script:
42   - pip install pytest-cov requests
43   - py.test -q --cov=sima --junitxml=report.xml tests
44   artifacts:
45     when: always
46     reports:
47       junit: report.xml
48
49 vinstall:
50   stage: test
51   script:
52   # test virtualenv install
53   - python3 ./vinstall.py
54   # smoke test
55   - ./vmpd-sima --help
56   artifacts:
57     expire_in: 1 hour
58
59 tag_release:
60   stage: build
61   dependencies:
62     - smoketest
63   script:
64     - python -V
65   artifacts:
66     paths:
67     - dist/*.whl
68     - dist/*.tar.gz
69     - dist/*.zip
70     name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG"
71   cache: {}
72   only:
73     - tags