-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
77 lines (66 loc) · 1.8 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
image: registry.gitlab.com/kaitaistructcompile.py/kaitai_struct_python_docker:latest
stages:
- build
- test
- tooling
variables:
GIT_DEPTH: "1"
DOCKER_DRIVER: overlay2
SAST_ANALYZER_IMAGE_TAG: latest
SAST_DISABLE_DIND: "true"
SAST_CONFIDENCE_LEVEL: 5
CODECLIMATE_VERSION: latest
include:
- template: SAST.gitlab-ci.yml
- template: Code-Quality.gitlab-ci.yml
build:
tags:
- shared
- linux
stage: build
variables:
GIT_SUBMODULE_STRATEGY: recursive
PYTHONUSERBASE: ${CI_PROJECT_DIR}/python_user_packages
before_script:
- export PATH="$PATH:$PYTHONUSERBASE/bin" # don't move into `variables`
- git clone --depth=1 https://gitlab.com/kaitaiStructCompile.py/kaitaiStructCompile.tests.ksys ./tests/ksys
cache:
paths:
- $PYTHONUSERBASE
- tests/kaitai_struct_formats
script:
- python3 setup.py bdist_wheel
- pip3 install --upgrade --pre ./dist/*.whl
- mkdir ./wheels
- mv ./dist/*.whl ./wheels/kaitaiStructCompile-0.CI-py3-none-any.whl
- cd ./tests # in order to isolate from kaitaiStructCompile dir in current dir, which doesn't contain backends, so interferes with them.
- coverage run --source=kaitaiStructCompile --branch -m pytest --junitxml=./rspec.xml ./test.py
- coverage report -m
- coverage xml
coverage: /^TOTAL(?:\s*\d+){4}\s(\d+%).+/
artifacts:
paths:
- wheels
- tests/output
reports:
junit: tests/rspec.xml
cobertura: ./coverage.xml
.pages: # disabled, remove dot to enable
stage: tooling
tags:
- shared
- linux
image: alpine:latest
allow_failure: true
before_script:
- apk update
- apk add doxygen
- apk add ttf-freefont graphviz
script:
- doxygen ./Doxyfile
- mv ./docs/html ./public
artifacts:
paths:
- public
only:
- master