-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
70 lines (61 loc) · 1.19 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
image: python:3.10-buster
before_script:
- pip install --upgrade pip
- pip install -e .[dev]
stages:
- test
- deploy
.pytest: &pytest
stage: test
script:
- pytest -v --junitxml=test_log.xml --cov=expkit --cov-report xml
artifacts:
when: always
paths:
- test_log.xml
- coverage.xml
reports:
junit: test_log.xml
coverage_report:
coverage_format: cobertura
path: coverage.xml
pytest-3.8:
<<: *pytest
image: python:3.8-buster
pytest-3.9:
<<: *pytest
image: python:3.9-buster
pytest-3.10:
<<: *pytest
image: python:3.10-buster
pages-test:
stage: test
script:
- mkdocs build --strict --verbose --site-dir test
artifacts:
paths:
- test
rules:
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
pages:
stage: deploy
script:
- mkdocs build --strict --verbose --site-dir public
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
pypi:
stage: deploy
script:
- pip install --upgrade twine build
- python -m build
- twine check dist/*
- twine upload dist/*
- echo Deployed to PyPI
artifacts:
paths:
- dist
only:
- tags