-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
90 lines (80 loc) · 1.88 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
include:
- template: Code-Quality.gitlab-ci.yml
- template: Dependency-Scanning.gitlab-ci.yml
- template: License-Scanning.gitlab-ci.yml
stages:
- test
- release
code_quality:
needs: []
artifacts:
paths:
- gl-code-quality-report.json
dependency_scanning:
needs: []
artifacts:
paths:
- gl-dependency-scanning-report.json
license_scanning:
needs: []
artifacts:
paths:
- gl-license-scanning-report.json
reports:
license_scanning: gl-license-scanning-report.json
.parallel:
parallel:
matrix:
- PYTHON_VERSION: ["3.7", "3.8", "3.9", "3.10", "3.11"]
test:
parallel: !reference [.parallel,parallel]
needs: []
stage: test
image: python:${PYTHON_VERSION}-slim
variables:
DOCKER_HOST: tcp://docker:2375
services:
- name: 'docker:dind'
alias: 'docker'
allow_failure: false
script:
- pip install --upgrade pip wheel setuptools
- pip install -r test_requirements.txt
- tox -e py${PYTHON_VERSION//./}
coverage: "/TOTAL.+ ([0-9]{1,3}%)/"
artifacts:
reports:
junit: junit*.xml
coverage_report:
coverage_format: cobertura
path: coverage*.xml
release-test-pypi-py3:
needs:
- test
stage: release
image: python:3.7-slim
variables:
TWINE_USERNAME: $TEST_PYPI_USERNAME
TWINE_PASSWORD: $TEST_PYPI_PASSWORD
script:
- pip install -U twine wheel setuptools
- python setup.py sdist bdist_wheel
- twine check dist/*
- twine upload --repository testpypi dist/*
rules:
- if: $CI_COMMIT_BRANCH == "develop"
release-pypi-py3:
needs:
- test
stage: release
image: python:3.7-slim
variables:
TWINE_USERNAME: $PYPI_USERNAME
TWINE_PASSWORD: $PYPI_PASSWORD
script:
- pip install -U twine wheel setuptools
- python setup.py sdist bdist_wheel
- twine check dist/*
- twine upload dist/*
rules:
- if: $CI_COMMIT_TAG