-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
96 lines (96 loc) · 2.18 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
# 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
default:
before_script:
- curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py
| python
- export PATH=$PATH:$HOME/.poetry/bin
stages:
- test
- build
- deploy
test-py36:
stage: test
image: python:3.6
script:
- pip install "tox>3,<4"
- tox -e py36
test-py37:
stage: test
image: python:3.7
script:
- pip install "tox>3,<4"
- tox -e py37
test-py38:
stage: test
image: python:3.8
script:
- pip install "tox>3,<4"
- tox -e py38
test-py39:
stage: test
image: python:3.9
script:
- pip install "tox>3,<4"
- tox -e py39
build-wheel:
stage: build
image: python:3.8
only:
- "/^v\\d+\\.\\d+\\.\\d+$/"
except:
- branches
environment:
name: pypi
script:
- poetry build
- python -m pip install pipx
- pipx install dist/*.whl
- "~/.local/bin/bamp -h"
- echo $?
artifacts:
untracked: false
expire_in: 30 days
paths:
- dist/*.whl
build-sdist:
stage: build
image: python:3.8
only:
- "/^v\\d+\\.\\d+\\.\\d+$/"
except:
- branches
environment:
name: pypi
script:
- poetry build
- python -m pip install pipx
- pipx install dist/*.tar.gz
- "~/.local/bin/bamp -h"
- echo $?
artifacts:
untracked: false
expire_in: 30 days
paths:
- dist/*.tar.gz
publish:
stage: deploy
image: python:3.8
only:
- "/^v\\d+\\.\\d+\\.\\d+$/"
except:
- branches
environment:
name: pypi
script:
- poetry publish --username "$POETRY_PYPI_USERNAME" --password "$POETRY_PYPI_PASSWORD"
sast:
stage: test
before_script:
- echo
include:
- template: Security/SAST.gitlab-ci.yml