-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
113 lines (103 loc) · 1.76 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
stages:
- quality
- test
- documentation
- deploy
image: python:3.10
before_script:
- pip install tox
lint:
stage: quality
script:
- tox -e lint
unittest:
stage: test
image: python:$PYTHON_VER
script:
- tox -e $ENV
- tox -e coverage-report
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: build/cobertura.xml
parallel:
matrix:
- ENV: py38
PYTHON_VER: "3.8"
- ENV: py39
PYTHON_VER: "3.9"
- ENV: py310
PYTHON_VER: "3.10"
- ENV: py311
PYTHON_VER: "3.11"
- ENV: py312
PYTHON_VER: "3.12"
docs:
stage: documentation
script:
- tox -e docs
changelog:
stage: documentation
script:
- tox -e changelog
description:
stage: documentation
script:
- tox -e pypi-description
publish_docs:
stage: deploy
script:
- tox -e docs
- mv docs/_build/html html
# - mv docs/_build/rinoh pdf
artifacts:
name: "docs-$CI_COMMIT_REF_NAME"
paths:
- html
# - pdf/mlnext.pdf
only:
- main
- tags
build:
stage: deploy
artifacts:
name: dist
paths:
- ./dist
expire_in: 1h
script:
- tox -e build
only:
- main
- tags
release-private:
stage: deploy
needs:
- build
before_script:
- pip install twine
script:
- python -m twine upload --verbose --skip-existing dist/*
only:
- tags
release-public-pypi:
stage: deploy
needs:
- build
before_script:
- pip install twine
script:
- >
python
-m twine upload
--verbose
--skip-existing
--repository-url ${PYPI_REPOSITORY_URL}
--cert ${PYPI_CERT}
-u ${PYPI_USER}
-p ${PYPI_TOKEN}
dist/*
only:
- pypi-release
- tags