-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
66 lines (57 loc) · 1.35 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
workflow:
rules:
- if: $CI_COMMIT_BRANCH =~ /^topic\/.*/ && $CI_PIPELINE_SOURCE == "push"
when: never
- when: always
stages:
- check
- test
.check:
stage: check
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/tryton/ci
check-flake8:
extends: .check
script:
- flake8
check-isort:
extends: .check
script:
- isort --multi-line VERTICAL_GRID --check --diff .
check-dist:
extends: .check
before_script:
- pip install twine
script:
- python setup.py sdist
- twine check dist/*
.test:
stage: test
.test-tox:
extends: .test
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip
before_script:
- pip install tox
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts:
reports:
junit: junit.xml
coverage_report:
coverage_format: cobertura
path: coverage.xml
test-tox-python:
extends: .test-tox
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/python:${PYTHON_VERSION}
script:
- tox -e "py${PYTHON_VERSION/./}" -- -v --output-file junit.xml
parallel:
matrix:
- PYTHON_VERSION: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
test-tox-pypy:
extends: .test-tox
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/pypy:3
script:
- tox -e pypy3 -- -v --output-file junit.xml