-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
89 lines (85 loc) · 1.85 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
# You can override the included template(s) by including variable overrides
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
# Note that environment variables can be set in several places
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- ".cache/pip"
- venv/
default:
image: python:3.9
before_script:
- python --version
stages:
- lint
- unit
- test
# lint
flake8:
stage: lint
script:
- pip3 install flake8
- flake8
mypy:
stage: lint
script:
- pip3 install tox
- tox -e mypy,system
# unit
unit:
stage: unit
image: python:3.9
script:
- pip3 install tox
- tox -e py39
artifacts:
expire_in: 2 days
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
# versions (now in test)
py36:
stage: test
image: python:3.6
script:
- pip3 install tox
- tox -e py36
py37:
stage: test
image: python:3.7
script:
- pip3 install tox
- tox -e py37
py38:
stage: test
image: python:3.8
script:
- pip3 install tox
- tox -e py38
py310:
stage: test
image: python:3.10
script:
- pip3 install tox
- tox -e py310
pypy37:
stage: test
image: pypy:3.7
script:
- pip3 install tox
- tox -e pypy3
pypy38:
stage: test
image: pypy:3.8
script:
- pip3 install tox
- tox -e pypy3
# test
include:
- template: Security/SAST.gitlab-ci.yml
- template: Security/Dependency-Scanning.gitlab-ci.yml