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