]> kaliko git repositories - python-musicpd.git/blob - .gitlab-ci.yml
Releasing 0.9.0
[python-musicpd.git] / .gitlab-ci.yml
1 image: python:latest
2
3 before_script:
4   - python -V      # Print out python version for debugging
5
6 stages:
7   - test
8   - build
9
10 test:
11   stage: test
12   script:
13   - pip install pytest-cov
14   - py.test -q --cov=musicpd test.py
15   coverage: '/musicpd.py\s+\d+\s+\d+\s+(\d+)%/'
16   only:
17     - pushes
18
19 build:
20   stage: build
21   script:
22   # packaging test
23   - python setup.py bdist_wheel sdist
24   - pip install dist/*.whl
25   - pip install twine
26   - twine check dist/*
27   artifacts:
28     expire_in: 1 week
29     paths:
30     - dist/*.whl
31     - dist/*.tar.gz
32     - dist/*.zip
33   only:
34     - pushes
35
36 tag_release:
37   stage: build
38   script:
39   - python setup.py bdist_wheel sdist
40   artifacts:
41     paths:
42     - dist/*.whl
43     - dist/*.tar.gz
44     - dist/*.zip
45     name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG"
46   only:
47     - tags
48
49 pages:
50   stage: build
51   script:
52   - pip install sphinx sphinx_rtd_theme
53   - sphinx-build -d ./build/doctrees doc/source -b html ./public -D html_theme=sphinx_rtd_theme
54   artifacts:
55     paths:
56     - public
57   only:
58   - master