forked from aphp/eds-pseudo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
56 lines (52 loc) · 1.05 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
image: harbor.eds.aphp.fr/public/python:3.8-slim
stages:
- test
- pages
- package
Linting:
stage: test
cache:
- key:
files:
- .pre-commit-config.yaml
paths:
- ~/.pre-commit
before_script:
- apt-get update
- apt-get install -y --no-install-recommends git
- pip install pre-commit
script:
- pre-commit run --all-files
only:
refs:
- main
- merge_request
pages:
stage: pages
cache:
- key:
files:
- poetry.lock
paths:
- .venv
before_script:
- pip install poetry
- poetry config virtualenvs.in-project true
- poetry install
script:
- poetry run mkdocs build --site-dir public
artifacts:
paths:
- public
only:
- main
Package:
stage: package
before_script:
- pip install poetry
- poetry config repositories.gitlab ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi
- poetry config http-basic.gitlab gitlab-ci-token ${CI_JOB_TOKEN}
script:
- poetry publish --build -r gitlab
only:
- tags