]> kaliko git repositories - python-musicpd.git/blob - .gitlab-ci.yml
Add CI tests with python 3.6 and fixed yaml format
[python-musicpd.git] / .gitlab-ci.yml
1 ---
2 image: python:latest
3
4 before_script:
5   - python -V      # Print out python version for debugging
6
7 stages:
8   - test
9   - build
10
11 .test:
12   stage: test
13   script:
14     - pip install pytest-cov
15     - py.test -q --cov=musicpd test.py
16   only:
17     - pushes
18
19 test-py3.11:
20   extends: ".test"
21   image: "python:3.11"
22
23 test-py3.10:
24   extends: ".test"
25   image: "python:3.10"
26   coverage: '/musicpd.py\s+\d+\s+\d+\s+(\d+)%/'
27
28 test-py3.9:
29   extends: ".test"
30   image: "python:3.9"
31
32 test-py3.8:
33   extends: ".test"
34   image: "python:3.8"
35
36 test-py3.7:
37   extends: ".test"
38   image: "python:3.7"
39
40 test-py3.6:
41   extends: ".test"
42   image: "python:3.6"
43
44
45 build:
46   stage: build
47   script:
48     # packaging test
49     - python setup.py bdist_wheel sdist
50     - pip install dist/*.whl
51     - pip install twine
52     - twine check dist/*
53   artifacts:
54     expire_in: 1 week
55     paths:
56       - dist/*.whl
57       - dist/*.tar.gz
58       - dist/*.zip
59   only:
60     - pushes
61
62 tag_release:
63   stage: build
64   script:
65     - python setup.py bdist_wheel sdist
66   artifacts:
67     paths:
68       - dist/*.whl
69       - dist/*.tar.gz
70       - dist/*.zip
71     name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG"
72   only:
73     - tags
74
75 pages:
76   stage: build
77   script:
78     - pip install sphinx sphinx_rtd_theme
79     - sphinx-build -d ./build/doctrees doc/source -b html ./public -D html_theme=sphinx_rtd_theme
80   artifacts:
81     paths:
82       - public
83   only:
84     - master