-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
.gitlab-ci.yml
78 lines (70 loc) · 1.27 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
image: python:3.9-slim
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
GIT_DEPTH: 10
DOCKER_DRIVER: overlay2
before_script:
- python -m venv venv
- source venv/bin/activate
stages:
- build
- test
- deploy
cache:
key: "${CI_JOB_NAME}"
paths:
- .cache/pip
- venv/
- .sonar/cache
build:
stage: build
script:
- python -m pip install build
- python -m build
artifacts:
name: tibia.py-dist
paths:
- dist/
docs:
stage: build
script:
- pip install -U -e .[docs]
- apt-get update && apt-get install -y make
- cd docs
- make html
artifacts:
name: tibia.py-docs
paths:
- docs/_build/
coverage:
stage: test
script:
- pip install -U -e .[testing]
- coverage run
- coverage report
- coverage html
- coverage xml
artifacts:
name: Coverage_Report
paths:
- htmlcov/
- coverage.xml
pages:
stage: deploy
image: alpine
cache: { }
dependencies:
- docs
- coverage
before_script: [ ]
script:
- mkdir public
- mv htmlcov/ public/coverage/
- mv docs/_build/html/* public/
artifacts:
paths:
- public
only:
- main
- dev