]> kaliko git repositories - python-musicpd.git/blob - .gitlab-ci.yml
Add CI tests with python 3.10
[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   only:
16     - pushes
17
18 test-py3.10:
19   extends: ".test"
20   image: "python:3.10"
21   coverage: '/musicpd.py\s+\d+\s+\d+\s+(\d+)%/'
22
23 test-py3.9:
24   extends: ".test"
25   image: "python:3.9"
26
27 test-py3.8:
28   extends: ".test"
29   image: "python:3.8"
30
31 test-py3.7:
32   extends: ".test"
33   image: "python:3.7"
34
35
36 build:
37   stage: build
38   script:
39   # packaging test
40   - python setup.py bdist_wheel sdist
41   - pip install dist/*.whl
42   - pip install twine
43   - twine check dist/*
44   artifacts:
45     expire_in: 1 week
46     paths:
47     - dist/*.whl
48     - dist/*.tar.gz
49     - dist/*.zip
50   only:
51     - pushes
52
53 tag_release:
54   stage: build
55   script:
56   - python setup.py bdist_wheel sdist
57   artifacts:
58     paths:
59     - dist/*.whl
60     - dist/*.tar.gz
61     - dist/*.zip
62     name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG"
63   only:
64     - tags
65
66 pages:
67   stage: build
68   script:
69   - pip install sphinx sphinx_rtd_theme
70   - sphinx-build -d ./build/doctrees doc/source -b html ./public -D html_theme=sphinx_rtd_theme
71   artifacts:
72     paths:
73     - public
74   only:
75   - master