forked from Oslandia/py3dtiles
-
Notifications
You must be signed in to change notification settings - Fork 7
/
.gitlab-ci.yml
101 lines (97 loc) · 2.28 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
stages:
- 🐍 lint
- 🤞 test
- 🚀 deploy
# -- LINT JOBS --------------------------------------------------------------------------
flake8:
stage: 🐍 lint
image:
name: python:3.10-slim-buster
before_script:
- python -m pip install -U flake8
script:
- flake8 setup.py py3dtiles/ docs/ tests/
only:
refs:
- merge_requests
- develop
- tags
- master
changes:
- "**/*.py"
# -- TEST JOBS --------------------------------------------------------------------------
test:
stage: 🤞 test
image:
name: python:$PYTHON_VERSION-slim-buster
before_script:
- apt update
- apt install -y pdal llvm
script:
- pip install .
- pip install .[dev]
- pytest
# TODO move that in unit tests
- py3dtiles info tests/pointCloudRGB.pnts
artifacts:
when: always
paths:
- coverage.xml
- junit/test-results.xml
reports:
junit: junit/test-results.xml
coverage_report:
coverage_format: cobertura
path: coverage.xml
only:
refs:
- merge_requests
- develop
- tags
- master
changes:
- "**/*.py"
parallel:
matrix:
- PYTHON_VERSION: ['3.7', '3.8', '3.9', '3.10']
sonarcloud-check:
stage: 🤞 test
needs: [test]
image:
name: sonarsource/sonar-scanner-cli:latest
variables:
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
cache:
key: "${CI_JOB_NAME}"
paths:
- .sonar/cache
script:
- sonar-scanner
only:
refs:
- merge_requests
- develop
- tags
- master
changes:
- "**/*.py"
# -- DEPLOY JOBS -------------------------------------------------------------------------
pages:
stage: 🚀 deploy
image: python:latest
script:
- pip install .
- pip install .[doc]
# sphinx-multiversion needs to have all the branches
- git fetch
- sphinx-multiversion docs public
- cp -rv docs/index_redirect.html public/index.html
- current_version="$(git tag --list | tail -n1)"
- sed -i "s/VERSION/$current_version/g" public/index.html
artifacts:
paths:
- public
only:
- master
- tags