-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
114 lines (100 loc) · 2.34 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
image: python
stages:
- earlytest
- fulltest
- deploy
before_script:
- apt-get update && apt-get install --no-install-recommends -y git-core
- pip install tox .[tests]
variables:
GIT_SUBMODULE_DEPTH: 1
GIT_SUBMODULE_STRATEGY: recursive
PYTHONPATH: "submodules/cryptoparser:submodules/cryptoparser/submodules/cryptodatahub"
pylint:
image: python:3.12-slim
stage: earlytest
script: tox -e pylint
pep8:
image: python:3.12-slim
stage: earlytest
script: tox -e pep8
python3:
image: python:3.12-slim
stage: earlytest
script: tox -e py312
python39:
image: python:3.9-slim
stage: fulltest
script: tox -e py39
python310:
image: python:3.10-slim
stage: fulltest
script: tox -e py310
python311:
image: python:3.11-slim
stage: fulltest
script: tox -e py311
python313:
image: python:3.13-slim
stage: fulltest
script: tox -e py313
pythonrc:
image: python:3.14-rc-slim
stage: fulltest
script: tox -e py314
coveralls:
image: python:3.12-slim
variables:
CI_NAME: gitlab
CI_BUILD_NUMBER: "${CI_JOB_ID}"
CI_BUILD_URL: "${CI_JOB_URL}"
CI_BRANCH: "${CI_COMMIT_REF_NAME}"
GIT_SUBMODULE_DEPTH: 1
GIT_SUBMODULE_STRATEGY: recursive
PYTHONPATH: "submodules/cryptoparser:submodules/cryptoparser/submodules/cryptodatahub"
stage: deploy
script:
- pip install coveralls
- pip install .
- pip install .[tests]
- coverage run -m unittest -v -f
- coveralls
only:
refs:
- master
dockerhub:
image: docker:latest
stage: deploy
services:
- docker:dind
variables:
DOCKER_NAME: coroner/${CI_PROJECT_NAME}
GIT_SUBMODULE_STRATEGY: recursive
before_script:
- if ! [ -z ${CI_COMMIT_TAG} ] ; then DOCKER_NAME="${DOCKER_NAME}:${CI_COMMIT_TAG}" ; fi
- echo "${CI_REGISTRY_PASSWORD}" | docker login -u "${CI_REGISTRY_USER}" --password-stdin "${CI_REGISTRY}"
script:
- docker build -t "$DOCKER_NAME" .
- docker push "$DOCKER_NAME"
only:
refs:
- branches
- tags
variables:
- $CI_COMMIT_TAG =~ /^v\d+.\d+.\d+$/
- $CI_COMMIT_REF_NAME == "master"
obs:
image: coroner/python_obs
stage: deploy
variables:
GIT_SUBMODULE_DEPTH: 1
GIT_SUBMODULE_STRATEGY: recursive
script:
- obs.sh
only:
refs:
- master
- tags
variables:
- $CI_COMMIT_TAG =~ /^v\d+.\d+.\d+$/
- $CI_COMMIT_REF_NAME == "master"