-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
115 lines (84 loc) · 1.55 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
115
stages:
- test
- build
- release
test:
image: python:3.10
stage: test
cache:
paths:
- .cache/pip
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
before_script:
- pip install tox
except:
- schedules
script:
- tox
lint:
image: python:3.10
stage: test
cache:
paths:
- .cache/pip
- .cache/pre-commit
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
PRE_COMMIT_HOME: "$CI_PROJECT_DIR/.cache/pre-commit"
before_script:
- pip install pre-commit
except:
- schedules
script:
- pre-commit run -a
docker-build:
stage: build
image: docker:24.0.6
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://docker:2375/
except:
- schedules
script:
- ci/build.sh
deploy-models:
stage: release
image: python:3.10
only:
- main
except:
- schedules
before_script:
- pip install pyyaml requests
script:
- python ci/publish_models.py
deploy-pypi:
stage: release
image: python:3.10
only:
- tags
environment:
name: pypi
url: https://pypi.org/project/doc-ufcn
before_script:
- pip install twine build
script:
- python -m build
- twine upload dist/*
release-notes:
stage: release
image: registry.gitlab.teklia.com/infra/devops:latest
only:
- tags
script:
- devops release-notes
bump-python-deps:
stage: release
image: registry.gitlab.teklia.com/infra/devops:latest
only:
- schedules
script:
- devops python-deps pyproject.toml